diff options
author | Chuck Bell <chuck.bell@oracle.com> | 2011-09-07 10:46:20 -0400 |
---|---|---|
committer | Chuck Bell <chuck.bell@oracle.com> | 2011-09-07 10:46:20 -0400 |
commit | b7478b966a0558655b57c703b5768d3e96b01d36 (patch) | |
tree | 94751d16bb6f6729e8cc28e8e96634d4a16067fd /client/mysql_plugin.c | |
parent | b5c334efb232b8c7c10cd08a4725d4a0df8782ba (diff) | |
download | mariadb-git-b7478b966a0558655b57c703b5768d3e96b01d36.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.c | 5 |
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\""; |