MDEV-21341: Fix UBSAN failures, part #5
Item_cond inherits from Item_args but doesn't store its arguments as function arguments, which means it has zero arguments. Don't call memcpy in this case.
This commit is contained in:
parent
5e5ae51b73
commit
4635047ca1
@ -109,7 +109,8 @@ Item_args::Item_args(THD *thd, const Item_args *other)
|
||||
arg_count= 0;
|
||||
return;
|
||||
}
|
||||
memcpy(args, other->args, sizeof(Item*) * arg_count);
|
||||
if (arg_count)
|
||||
memcpy(args, other->args, sizeof(Item*) * arg_count);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user