Commit 742ccf7a authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-221 : Fix potential memory access past the end of input string in filename_to_tablename()

parent 24516289
......@@ -379,7 +379,7 @@ uint filename_to_tablename(const char *from, char *to, uint to_length
DBUG_ENTER("filename_to_tablename");
DBUG_PRINT("enter", ("from '%s'", from));
if (!memcmp(from, tmp_file_prefix, tmp_file_prefix_length))
if (!strncmp(from, tmp_file_prefix, tmp_file_prefix_length))
{
/* Temporary table name. */
res= (strnmov(to, from, to_length) - to);
......
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