summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2019-10-30 12:53:25 +0300
committerEugene Kosov <claprix@yandex.ru>2019-10-30 12:53:25 +0300
commita7e3008ab3d368c2e2957b346647a7656d638e5c (patch)
treeb07f1127faee338220418b441da676bc306c6466 /sql/sql_show.cc
parentbc8a9ab5f32a73e7e41680f98ba516611bc00ce0 (diff)
downloadmariadb-git-a7e3008ab3d368c2e2957b346647a7656d638e5c.tar.gz
MDEV-20926 UBSAN: load of value 165, which is not a valid value for type bool
Basicaly it's an uninitialized read. 165 is 0xa5 which comes from TRASH_ALLOC() Fix by calling a class ctor which initializes problematic TMP_TABLE_PARAM::force_copy_fields field
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index d8f65c74448..c63b8b0f8a8 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -7708,8 +7708,7 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list)
item->maybe_null= (fields_info->field_flags & MY_I_S_MAYBE_NULL);
field_count++;
}
- TMP_TABLE_PARAM *tmp_table_param =
- (TMP_TABLE_PARAM*) (thd->alloc(sizeof(TMP_TABLE_PARAM)));
+ TMP_TABLE_PARAM *tmp_table_param = new TMP_TABLE_PARAM;
tmp_table_param->init();
tmp_table_param->table_charset= cs;
tmp_table_param->field_count= field_count;