Commit 532d9c30 authored by Sergei Golubchik's avatar Sergei Golubchik

one-byte overflow with old passwords

parent f8f2cdf2
...@@ -3934,8 +3934,8 @@ static int old_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) ...@@ -3934,8 +3934,8 @@ static int old_password_auth_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
return CR_SERVER_HANDSHAKE_ERR; return CR_SERVER_HANDSHAKE_ERR;
/* save it in MYSQL */ /* save it in MYSQL */
memcpy(mysql->scramble, pkt, pkt_len); memcpy(mysql->scramble, pkt, pkt_len - 1);
mysql->scramble[pkt_len] = 0; mysql->scramble[pkt_len - 1] = 0;
} }
if (mysql->passwd[0]) if (mysql->passwd[0])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment