summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2019-04-30 12:29:40 +0200
committerSergei Golubchik <serg@mariadb.org>2019-05-01 10:15:29 +0200
commitaba911542641c93553bad0307021983998042d69 (patch)
tree3589a2e0a00ff0f502f802b4b1bba7e328d496e5 /sql
parent71a748d575b4d0ae8e80171fb6d261277da9b0ed (diff)
downloadmariadb-git-aba911542641c93553bad0307021983998042d69.tar.gz
MDEV-19349 mysql_install_db: segfault at tmp_file_prefix check
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_base.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index c774334e695..c7e356cd09e 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -9301,13 +9301,7 @@ my_bool mysql_rm_tmp_tables(void)
{
file=dirp->dir_entry+idx;
- /* skiping . and .. */
- if (file->name[0] == '.' && (!file->name[1] ||
- (file->name[1] == '.' && !file->name[2])))
- continue;
-
- if (!memcmp(file->name, tmp_file_prefix,
- tmp_file_prefix_length))
+ if (!strncmp(file->name, tmp_file_prefix, tmp_file_prefix_length))
{
char *ext= fn_ext(file->name);
uint ext_len= strlen(ext);