Commit f032a9ac authored by Harin Vadodaria's avatar Harin Vadodaria

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.
parent 69d8812a
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment