]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Issue 134: Fix libarchive 2.8 crashing in archive_write_finish() when
authorTim Kientzle <kientzle@gmail.com>
Sun, 6 Feb 2011 05:36:18 +0000 (00:36 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 6 Feb 2011 05:36:18 +0000 (00:36 -0500)
the open has failed and we're trying to write Zip format.

SVN-Revision: 2955

libarchive/archive_write_set_format_zip.c

index 14cc6697df03c7d5829da019bbc0b8ef013e3bec..201152f3a9e7de35bef237b1daf14db8f734a6e8 100644 (file)
@@ -502,6 +502,9 @@ archive_write_zip_finish(struct archive_write *a)
        int entries;
        int ret;
 
+       if (a->compressor.write == NULL)
+               return (ARCHIVE_OK);
+
        zip = a->format_data;
        l = zip->central_directory;