mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
This commit is contained in:
commit
606927f78f
1 changed files with 4 additions and 1 deletions
|
@ -909,9 +909,12 @@ static int check_connection(THD *thd)
|
|||
Old clients send null-terminated string as password; new clients send
|
||||
the size (1 byte) + string (not null-terminated). Hence in case of empty
|
||||
password both send '\0'.
|
||||
|
||||
Cast *passwd to an unsigned char, so that it doesn't extend the sign for
|
||||
*passwd > 127 and become 2**32-127 after casting to uint.
|
||||
*/
|
||||
uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
|
||||
*passwd++ : strlen(passwd);
|
||||
(uchar)(*passwd++) : strlen(passwd);
|
||||
db= thd->client_capabilities & CLIENT_CONNECT_WITH_DB ?
|
||||
db + passwd_len + 1 : 0;
|
||||
uint db_len= db ? strlen(db) : 0;
|
||||
|
|
Loading…
Reference in a new issue