1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

one-byte overflow with old passwords

This commit is contained in:
Sergei Golubchik
2012-12-11 09:50:48 +01:00
parent f8f2cdf21f
commit 532d9c3028

View File

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