MDEV-9698 Buffer overflow in extension_based_table_discovery()
fix a buffer overflow in extension_based_table_discovery (that only happens in debug builds)
This commit is contained in:
parent
ee687771ee
commit
8b9432ffac
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user