summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-01-29 11:18:06 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2021-01-29 11:18:06 +0100
commit17867608a2c3a13c909a2362ec5ee2a5a41547c1 (patch)
tree27ab60b37a44fc5ed65b2a0e7e256e4d10738e12 /sql/item_cmpfunc.cc
parent33ede50f207552df835d7606f990fa9ccc4e0d12 (diff)
downloadmariadb-git-17867608a2c3a13c909a2362ec5ee2a5a41547c1.tar.gz
ASAN heap-use-after-free in Item_exists_subselect::is_top_level_item
check that we can do type casting
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index d16c7413f0a..d5b89f13f04 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1234,7 +1234,9 @@ longlong Item_func_truth::val_int()
bool Item_in_optimizer::is_top_level_item()
{
- return ((Item_in_subselect *)args[1])->is_top_level_item();
+ if (!invisible_mode())
+ return ((Item_in_subselect *)args[1])->is_top_level_item();
+ return false;
}