mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -3475,7 +3475,8 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
|
|||||||
|
|
||||||
if (lower_case_table_names && db)
|
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);
|
my_casedn_str(files_charset_info, tmp_db);
|
||||||
db=tmp_db;
|
db=tmp_db;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user