From: Martin Matuska Date: Fri, 14 Jul 2023 07:53:13 +0000 (+0200) Subject: tests: fix exit on failed realloc in libarchive/test/test_fuzz.c X-Git-Tag: v3.7.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26b641ddb23323b069cd80be9fc1e0e70972a14e;p=thirdparty%2Flibarchive.git tests: fix exit on failed realloc in libarchive/test/test_fuzz.c --- diff --git a/libarchive/test/test_fuzz.c b/libarchive/test/test_fuzz.c index 3fbe64410..8af4c2f29 100644 --- a/libarchive/test/test_fuzz.c +++ b/libarchive/test/test_fuzz.c @@ -124,10 +124,9 @@ test_fuzz(const struct files *filesets) newraw = realloc(rawimage, oldsize + size); if (!assert(newraw != NULL)) { - free(rawimage); - rawimage = NULL; free(tmp); - continue; + size = 0; + break; } rawimage = newraw; memcpy(rawimage + oldsize, tmp, size);