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)
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])
......
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