From: Tim Kientzle Date: Sat, 14 Jun 2008 14:01:08 +0000 (-0400) Subject: If Zip entry has already been read, don't try to read it again. X-Git-Tag: v2.6.0~181 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=538aae051cc57b5ad9365733cd43c9b2a93fccba;p=thirdparty%2Flibarchive.git If Zip entry has already been read, don't try to read it again. SVN-Revision: 111 --- diff --git a/libarchive/archive_read_support_format_zip.c b/libarchive/archive_read_support_format_zip.c index 4cdde5ed6..d6fe88086 100644 --- a/libarchive/archive_read_support_format_zip.c +++ b/libarchive/archive_read_support_format_zip.c @@ -747,6 +747,10 @@ archive_read_format_zip_read_data_skip(struct archive_read *a) zip = (struct zip *)(a->format->data); + /* If we've already read to end of data, we're done. */ + if (zip->end_of_entry_cleanup) + return (ARCHIVE_OK); + /* * If the length is at the end, we have no choice but * to decompress all the data to find the end marker.