Skip to content

Commit 012d6f4

Browse files
committed
Bug#21982313: Quantified comparison reads uninitialized data
This is yet another occurrence of missing error check, this time in Item_equal::compare_const(). Actually, a test could be moved so that it covered both branches of an IF-statement instead of one.
1 parent 4e7ad06 commit 012d6f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/item_cmpfunc.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7211,9 +7211,9 @@ bool Item_equal::compare_const(THD *thd, Item *c)
72117211
return true;
72127212
func->quick_fix_field();
72137213
cond_false= !func->val_int();
7214-
if (thd->is_error())
7215-
return true;
72167214
}
7215+
if (thd->is_error())
7216+
return true;
72177217
if (cond_false)
72187218
const_item_cache= 1;
72197219
return false;

0 commit comments

Comments
 (0)