diff options
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 19b1b86cfa5..e18af7d85b4 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -3940,8 +3940,8 @@ static int old_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) return CR_SERVER_HANDSHAKE_ERR; /* save it in MYSQL */ - memcpy(mysql->scramble, pkt, pkt_len); - mysql->scramble[pkt_len] = 0; + memcpy(mysql->scramble, pkt, pkt_len - 1); + mysql->scramble[pkt_len - 1] = 0; } if (mysql->passwd[0]) |