1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

fixed password buffer overflow

This commit is contained in:
unknown
2003-08-07 11:16:34 +02:00
parent e2a4c4a5d2
commit 61f953e88a

View File

@@ -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 */