small optimization of the previous bugfix
(based on the fact that packet is ALWAYS \0 terminated, see my_net_read)
This commit is contained in:
parent
3144d5eb48
commit
1409dc6f59
@ -647,7 +647,7 @@ check_connections(THD *thd)
|
||||
char *db=0;
|
||||
if (thd->client_capabilities & CLIENT_CONNECT_WITH_DB)
|
||||
db=strend(passwd)+1;
|
||||
if (strend(db ? db : passwd) - (char*)net->read_pos > pkt_len)
|
||||
if ((db ? db : passwd) - (char*)net->read_pos > pkt_len)
|
||||
{
|
||||
inc_host_errors(&thd->remote.sin_addr);
|
||||
return ER_HANDSHAKE_ERROR;
|
||||
|
Loading…
x
Reference in New Issue
Block a user