From: Tim Kientzle Date: Sun, 6 Feb 2011 05:36:18 +0000 (-0500) Subject: Issue 134: Fix libarchive 2.8 crashing in archive_write_finish() when X-Git-Tag: v2.8.5~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a4fadad81fb297465c2f316fafd2d8ae443dbac;p=thirdparty%2Flibarchive.git Issue 134: Fix libarchive 2.8 crashing in archive_write_finish() when the open has failed and we're trying to write Zip format. SVN-Revision: 2955 --- diff --git a/libarchive/archive_write_set_format_zip.c b/libarchive/archive_write_set_format_zip.c index 14cc6697d..201152f3a 100644 --- a/libarchive/archive_write_set_format_zip.c +++ b/libarchive/archive_write_set_format_zip.c @@ -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;