don't assert() that realloc() worked inside a conditional.

found by GCC 12.
This commit is contained in:
mrg 2023-08-01 08:53:05 +00:00
parent f386908b27
commit c933870198
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ test_fuzz(const struct files *filesets)
tmp = slurpfile(&size, "%s",
filesets[n].names[i]);
newraw = realloc(rawimage, oldsize + size);
if (!assert(newraw != NULL))
if (newraw == NULL)
{
free(rawimage);
rawimage = NULL;