diff options
Diffstat (limited to 'sql-common/client.c')
-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 e4c4c2ad4a1..96fc8cf71a2 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -4444,8 +4444,8 @@ static int old_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) DBUG_RETURN(CR_SERVER_HANDSHAKE_ERR); /* save it in MYSQL */ - memmove(mysql->scramble, pkt, pkt_len); - mysql->scramble[pkt_len] = 0; + memmove(mysql->scramble, pkt, pkt_len - 1); + mysql->scramble[pkt_len - 1] = 0; } if (mysql->passwd[0]) |