Skip to content
Permalink
Browse files
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.
  • Loading branch information
dr-m committed Dec 22, 2022
1 parent 5cec834 commit 4493642
Showing 1 changed file with 1 addition and 2 deletions.
@@ -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;

0 comments on commit 4493642

Please sign in to comment.