Commit 61f953e8 authored by unknown's avatar unknown

fixed password buffer overflow

parent e2a4c4a5
......@@ -206,10 +206,10 @@ int acl_init(bool dont_read_acl_tables)
"Found old style password for user '%s'. Ignoring user. (You may want to restart using --old-protocol)",
user.user ? user.user : ""); /* purecov: tested */
}
else if (length % 8) // This holds true for passwords
else if (length % 8 || length > 16)
{
sql_print_error(
"Found invalid password for user: '%s@%s'; Ignoring user",
"Found invalid password for user: '%s'@'%s'; Ignoring user",
user.user ? user.user : "",
user.host.hostname ? user.host.hostname : ""); /* purecov: tested */
continue; /* purecov: tested */
......
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