summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2003-08-07 11:16:34 +0200
committerunknown <serg@serg.mylan>2003-08-07 11:16:34 +0200
commit47c4494fd8bbd167c977dfb5c80e1b6fdd9ac0e6 (patch)
tree897274ecf4c152f11d6bca8bd082c81600ab6933 /sql
parenta35a0a240d0d9fb58835b1b93e31e34d2a5eb350 (diff)
downloadmariadb-git-47c4494fd8bbd167c977dfb5c80e1b6fdd9ac0e6.tar.gz
fixed password buffer overflow
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_acl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index f36e39b0645..554417322a4 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -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 */