From d958c04318cbe19925f4498f59d65f8e77a2e9dc Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Fri, 13 Nov 2009 02:11:45 -0500 Subject: [PATCH] If gzip decompression stumbles at the very end, return the error. Thanks to Michihiro NAKAJIMA and Clang Static Analyzer for pointing out this oversight. SVN-Revision: 1652 --- libarchive/archive_read_support_compression_gzip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libarchive/archive_read_support_compression_gzip.c b/libarchive/archive_read_support_compression_gzip.c index cd21c6129..52e818a11 100644 --- a/libarchive/archive_read_support_compression_gzip.c +++ b/libarchive/archive_read_support_compression_gzip.c @@ -411,6 +411,8 @@ gzip_filter_read(struct archive_read_filter *self, const void **p) /* Consume the stream trailer; release the * decompression library. */ ret = consume_trailer(self); + if (ret < ARCHIVE_OK) + return (ret); break; default: /* Return an error. */ -- 2.47.3