From: Tim Kientzle Date: Sun, 29 Nov 2009 20:14:52 +0000 (-0500) Subject: If we don't have any way to decompress a test archive (neither library nor command... X-Git-Tag: v2.8.0~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6feb4cef35f246a3da0fe86d92957b2677046d4;p=thirdparty%2Flibarchive.git If we don't have any way to decompress a test archive (neither library nor command-line util), just skip it. SVN-Revision: 1678 --- diff --git a/libarchive/test/test_fuzz.c b/libarchive/test/test_fuzz.c index 71b020c78..b102350bf 100644 --- a/libarchive/test/test_fuzz.c +++ b/libarchive/test/test_fuzz.c @@ -87,14 +87,19 @@ DEFINE_TEST(test_fuzz) extract_reference_file(filename); if (files[n].uncompress) { + int r; /* Use format_raw to decompress the data. */ assert((a = archive_read_new()) != NULL); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a)); assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_raw(a)); - assertEqualIntA(a, ARCHIVE_OK, - archive_read_open_filename(a, filename, 16384)); + r = archive_read_open_filename(a, filename, 16384); + if (r != ARCHIVE_OK) { + archive_read_finish(a); + skipping("Cannot uncompress %s", filename); + continue; + } assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); rawimage = malloc(buffsize);