diff options
Diffstat (limited to 'client/mysql_upgrade.c')
-rw-r--r-- | client/mysql_upgrade.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 9ac438ff6ea..4e4970bacab 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -1130,7 +1130,7 @@ static int check_version_match(void) int main(int argc, char **argv) { - char self_name[FN_REFLEN]; + char self_name[FN_REFLEN + 1]; MY_INIT(argv[0]); @@ -1138,7 +1138,7 @@ int main(int argc, char **argv) if (GetModuleFileName(NULL, self_name, FN_REFLEN) == 0) #endif { - strncpy(self_name, argv[0], FN_REFLEN); + strmake_buf(self_name, argv[0]); } if (init_dynamic_string(&ds_args, "", 512, 256) || |