From b7478b966a0558655b57c703b5768d3e96b01d36 Mon Sep 17 00:00:00 2001 From: Chuck Bell Date: Wed, 7 Sep 2011 10:46:20 -0400 Subject: [PATCH] BUG#12929631 : Execute crashes with --verbose output (Windows) This patch corrects an unsafe string concatenation in the Windows specific code for building the bootstrap command to enable or disable the plugin. --- client/mysql_plugin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/mysql_plugin.c b/client/mysql_plugin.c index 6679fa9ca6f..267ede5447c 100644 --- a/client/mysql_plugin.c +++ b/client/mysql_plugin.c @@ -1157,10 +1157,11 @@ static int bootstrap_server(char *server_path, char *bootstrap_file) #ifdef __WIN__ char *format_str= 0; - char *verbose_str= ""; + const char *verbose_str= NULL; + if (opt_verbose) - strcat(verbose_str, "--console"); + verbose_str= "--console"; if (has_spaces(opt_datadir) || has_spaces(opt_basedir) || has_spaces(bootstrap_file)) format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s < %s\"";