Commit 4493642e authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-29562 fixup: ASAN global-buffer-overflow

ha_spider::create(): Pass the correct length of the argument of the
CHARSET attribute. The macro STRING_WITH_LEN() is intended to be used
with NUL terminated string constants only. Here, it would incorrectly
pass sizeof(char*)-1 as the length.
parent 5cec8347
......@@ -11468,8 +11468,7 @@ int ha_spider::create(
{
String charset_option;
charset_option.append(STRING_WITH_LEN("CHARSET "));
charset_option.append(
STRING_WITH_LEN(info->default_table_charset->cs_name.str));
charset_option.append(info->default_table_charset->cs_name);
my_error(ER_ILLEGAL_HA_CREATE_OPTION, MYF(0), "SPIDER",
charset_option.c_ptr());
error_num= ER_ILLEGAL_HA_CREATE_OPTION;
......
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