Commit a4aa1f85 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-6329 - Buffer overrun in find_uniq_filename

Merged WebScaleSQL fix:
https://github.com/webscalesql/webscalesql-5.6/commit/bce9eddc1da87beab17c60d7eb7379841a3d45af
parent 08a172dc
...@@ -2244,7 +2244,7 @@ static int find_uniq_filename(char *name) ...@@ -2244,7 +2244,7 @@ static int find_uniq_filename(char *name)
file_info= dir_info->dir_entry; file_info= dir_info->dir_entry;
for (i= dir_info->number_off_files ; i-- ; file_info++) for (i= dir_info->number_off_files ; i-- ; file_info++)
{ {
if (memcmp(file_info->name, start, length) == 0 && if (strncmp(file_info->name, start, length) == 0 &&
test_if_number(file_info->name+length, &number,0)) test_if_number(file_info->name+length, &number,0))
{ {
set_if_bigger(max_found,(ulong) number); set_if_bigger(max_found,(ulong) number);
......
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