Commit d71f1983 authored by cmiller@zippy.(none)'s avatar cmiller@zippy.(none)

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into  zippy.(none):/home/cmiller/work/mysql/mysql-5.0__bug17667
parents c40f8557 0f63c3d3
...@@ -99,7 +99,11 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap) ...@@ -99,7 +99,11 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
else if (*fmt == 'b') /* Buffer parameter */ else if (*fmt == 'b') /* Buffer parameter */
{ {
char *par = va_arg(ap, char *); 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; continue;
} }
else if (*fmt == 'd' || *fmt == 'u'|| *fmt== 'x') /* Integer parameter */ else if (*fmt == 'd' || *fmt == 'u'|| *fmt== 'x') /* Integer parameter */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment