summaryrefslogtreecommitdiff
path: root/client/mysql_plugin.c
diff options
context:
space:
mode:
authorChuck Bell <chuck.bell@oracle.com>2011-09-07 10:46:20 -0400
committerChuck Bell <chuck.bell@oracle.com>2011-09-07 10:46:20 -0400
commit6495237fc77866c70fe63768acc18e2f16bed519 (patch)
tree94751d16bb6f6729e8cc28e8e96634d4a16067fd /client/mysql_plugin.c
parent4024c206708839f9ab395411149ab78880dbd5af (diff)
downloadmariadb-git-6495237fc77866c70fe63768acc18e2f16bed519.tar.gz
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.
Diffstat (limited to 'client/mysql_plugin.c')
-rw-r--r--client/mysql_plugin.c5
1 files 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\"";