Commit 2303a8c6 authored by Ramil Kalimullin's avatar Ramil Kalimullin

Manual merge.

parents 4d0e9957 0d5dbb16
...@@ -1300,8 +1300,16 @@ bool dispatch_command(enum enum_server_command command, THD *thd, ...@@ -1300,8 +1300,16 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
We have name + wildcard in packet, separated by endzero We have name + wildcard in packet, separated by endzero
*/ */
arg_end= strend(packet); arg_end= strend(packet);
uint arg_length= arg_end - packet;
/* Check given table name length. */
if (arg_length >= packet_length || arg_length > NAME_LEN)
{
my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
break;
}
thd->convert_string(&conv_name, system_charset_info, thd->convert_string(&conv_name, system_charset_info,
packet, (uint) (arg_end - packet), thd->charset()); packet, arg_length, thd->charset());
table_list.alias= table_list.table_name= conv_name.str; table_list.alias= table_list.table_name= conv_name.str;
packet= arg_end + 1; packet= arg_end + 1;
......
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