mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 18:20:07 +01:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue