Commit 8b9432ff authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-9698 Buffer overflow in extension_based_table_discovery()

fix a buffer overflow in extension_based_table_discovery
(that only happens in debug builds)
parent ee687771
......@@ -206,7 +206,8 @@ int extension_based_table_discovery(MY_DIR *dirp, const char *ext_meta,
{
size_t len= (octothorp ? octothorp : ext) - cur->name;
if (from != cur &&
(my_strnncoll(cs, (uchar*)from->name, len, (uchar*)cur->name, len) ||
(strlen(from->name) <= len ||
my_strnncoll(cs, (uchar*)from->name, len, (uchar*)cur->name, len) ||
(from->name[len] != FN_EXTCHAR && from->name[len] != '#')))
advance(from, to, cur, skip);
......
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