Below is the list of changes that have just been committed into a local
5.0 repository of cmiller. When cmiller does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2113 06/05/02 13:42:35 cmiller@zippy.(none) +1 -0
An update to as-yet unused new feature of snprintf, which was added to bring
our sprintf()-alike in sync with our fprintf()-alike features.
strings/my_vsnprintf.c
1.35 06/05/02 13:42:30 cmiller@zippy.(none) +5 -1
Advance the destination pointer properly.
Also, pay attention to the "n" in snprintf() -- never write too much.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: cmiller
# Host: zippy.(none)
# Root: /home/cmiller/work/mysql/mysql-5.0__bug17667
--- 1.34/strings/my_vsnprintf.c 2006-05-01 22:10:44 -04:00
+++ 1.35/strings/my_vsnprintf.c 2006-05-02 13:42:30 -04:00
@@ -99,7 +99,11 @@
else if (*fmt == 'b') /* Buffer parameter */
{
char *par = va_arg(ap, char *);
- to=memmove(to, par, abs(width));
+ DBUG_ASSERT(to <= end);
+ if (to + abs(width) + 1 > end)
+ width= end - to - 1; /* sign doesn't matter */
+ memmove(to, par, abs(width));
+ to+= width;
continue;
}
else if (*fmt == 'd' || *fmt == 'u'|| *fmt== 'x') /* Integer parameter */
| Thread |
|---|
| • bk commit into 5.0 tree (cmiller:1.2113) | Chad MILLER | 2 May |