From 3eb9c0be7df702a8af47daa2d01929704d8a41c9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Mar 2002 21:14:13 -0700 Subject: post-merge fixup BitKeeper/etc/ignore: Added mysys/test_vsnprintf to the ignore list mysql-test/mysql-test-run.sh: post-merge fix mysys/my_vsnprintf.c: fixed newly introduced bug --- mysys/my_vsnprintf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mysys/my_vsnprintf.c') diff --git a/mysys/my_vsnprintf.c b/mysys/my_vsnprintf.c index ccd4fbb74fc..7b6d9672eb6 100644 --- a/mysys/my_vsnprintf.c +++ b/mysys/my_vsnprintf.c @@ -19,6 +19,7 @@ #include #include #include +#include int my_snprintf(char* to, size_t n, const char* fmt, ...) { @@ -53,7 +54,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap) plen = (uint) strlen(par); if (left_len <= plen) plen = left_len - 1; - to=strmov(to,par); + to=strnmov(to,par,plen); continue; } else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ @@ -73,6 +74,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap) break; *to++='%'; /* % used as % or unknown code */ } + DBUG_ASSERT(to <= end); *to='\0'; /* End of errmessage */ return (uint) (to - start); } -- cgit v1.2.1