mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug#14834378 ADDRESSSANITIZER BUG IN FILENAME_TO_TABLENAME
Backport to 5.5
This commit is contained in:
@@ -378,7 +378,8 @@ 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 (strlen(from) >= tmp_file_prefix_length &&
|
||||
!memcmp(from, tmp_file_prefix, tmp_file_prefix_length))
|
||||
{
|
||||
/* Temporary table name. */
|
||||
res= (strnmov(to, from, to_length) - to);
|
||||
|
Reference in New Issue
Block a user