diff options
author | unknown <msvensson@shellback.(none)> | 2006-10-11 11:21:44 +0200 |
---|---|---|
committer | unknown <msvensson@shellback.(none)> | 2006-10-11 11:21:44 +0200 |
commit | 3caef95e641b335b5fb0fcbaec79ec97d868c816 (patch) | |
tree | b8bf41d7cddfb27ec889c406c34babc70b27a6ea /client | |
parent | eab94fd0ba53ed78c5104bfea7e48bb29c26126a (diff) | |
download | mariadb-git-3caef95e641b335b5fb0fcbaec79ec97d868c816.tar.gz |
Fix some bad code in mysqltest.c which cause segfault
client/mysqltest.c:
Remove vsnprintf() and DBUG_PRINT from die() function, as it's not portable to Windows, and it's not allowed to
call vsnprintf() and then vfprintf() with the same args.
Can't just print the buffer here, because the buffer is a fixed size.
If the message is longer than will fit int he buffer, it would get
truncated on Unix, and the full thing would be printed on Windows.
This DBUG_PRINT isn't important enough for this hassle, so just get rid
of it.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 3f8bc99bdf8..0a9549acc47 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -727,13 +727,6 @@ void die(const char *fmt, ...) va_start(args, fmt); if (fmt) { -#ifdef DBUG_ON -#ifndef __WIN__ - char buff[256]; - vsnprintf(buff, sizeof(buff), fmt, args); - DBUG_PRINT("error", ("%s", buff)); -#endif -#endif fprintf(stderr, "mysqltest: "); if (cur_file && cur_file != file_stack) fprintf(stderr, "In included file \"%s\": ", |