diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-12-11 09:50:48 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-12-11 09:50:48 +0100 |
commit | 532d9c30283db4a35d92e40f3df9f4e7f86d45c6 (patch) | |
tree | ce6876febc239c2deec85e0fee4ac3d971c7127e /sql-common | |
parent | f8f2cdf21ff47cdbf7d81c5445281288b51c0298 (diff) | |
download | mariadb-git-532d9c30283db4a35d92e40f3df9f4e7f86d45c6.tar.gz |
one-byte overflow with old passwords
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 b37b63aaaf1..d9444a7d976 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -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]) |