1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#16372927: STACK OVERFLOW WITH LONG DATABASE NAME IN

GRANT STATEMENT

Description: A missing length check causes problem while
             copying source to destination when
             lower_case_table_names is set to a value
             other than 0. This patch fixes the issue
             by ensuring that requried bound check is
             performed.
This commit is contained in:
Harin Vadodaria
2013-02-26 21:23:06 +05:30
parent 053d7e775c
commit fd4ea8b094

View File

@ -3475,7 +3475,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;
}