summaryrefslogtreecommitdiff
path: root/client/mysql_upgrade.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysql_upgrade.c')
-rw-r--r--client/mysql_upgrade.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 9a73263f558..6ec361392c8 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -200,7 +200,7 @@ retry_open:
}
buffer_end= strnmov(buffer, "\n[client]", sizeof(buffer));
if (opt_password)
- buffer_end= strxnmov(buffer, sizeof(buffer),
+ buffer_end= strxnmov(buffer_end, sizeof(buffer),
"\npassword=", opt_password, NullS);
error= my_write(defaults_file, buffer, (int) (buffer_end - buffer),
MYF(MY_WME | MY_FNABP));