diff options
author | Harin Vadodaria <harin.vadodaria@oracle.com> | 2013-02-26 21:29:43 +0530 |
---|---|---|
committer | Harin Vadodaria <harin.vadodaria@oracle.com> | 2013-02-26 21:29:43 +0530 |
commit | ca2708c061b45b3b36500b44cfef953a3124e091 (patch) | |
tree | 61baebb7764cc6e5ee1564c15b956d668b862477 /sql/sql_acl.cc | |
parent | 97a74e5b102628309b6c58b55016446bc86f869f (diff) | |
parent | fd4ea8b0942cd6c709f3931a3afc280c5fa16a1c (diff) | |
download | mariadb-git-ca2708c061b45b3b36500b44cfef953a3124e091.tar.gz |
Bug#16372927: STACK OVERFLOW WITH LONG DATABASE NAME IN
GRANT STATEMENT
Description: Merge from 5.1.
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index fdd9b107bf2..090546e5013 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3999,7 +3999,8 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list, if (lower_case_table_names && db) { - strmov(tmp_db,db); + strnmov(tmp_db,db,NAME_LEN); + tmp_db[NAME_LEN]= '\0'; my_casedn_str(files_charset_info, tmp_db); db=tmp_db; } |