summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2014-06-11 16:23:20 +0400
committerSergey Vojtovich <svoj@mariadb.org>2014-06-11 16:23:20 +0400
commita4aa1f852d9c9ab5d6ceb8bc33c2de857483ffac (patch)
treecd69227044993530fbf78d9173586aee9f801cab /sql/log.cc
parent08a172dc5a35e41240b40b8655733b63f2391b8b (diff)
downloadmariadb-git-a4aa1f852d9c9ab5d6ceb8bc33c2de857483ffac.tar.gz
MDEV-6329 - Buffer overrun in find_uniq_filename
Merged WebScaleSQL fix: https://github.com/webscalesql/webscalesql-5.6/commit/bce9eddc1da87beab17c60d7eb7379841a3d45af
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc
index d129fcbe8a9..6d4d52b3f2e 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -2244,7 +2244,7 @@ static int find_uniq_filename(char *name)
file_info= dir_info->dir_entry;
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))
{
set_if_bigger(max_found,(ulong) number);