Constrain the values of a and b in function not to be both NULL (#3106)

Fixes #2686
This commit is contained in:
Paulo Matos 2020-04-17 21:55:17 +02:00 committed by GitHub
parent 734491b511
commit 876aff85c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6450,7 +6450,9 @@ static void *splice_ptr_array(void **a, int al, void **b, int bl, int i)
{
void **r;
int j;
MZ_ASSERT (a != NULL || b != NULL);
r = MALLOC_N(void*, al + bl - 1);
if (a)