]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
If gzip decompression stumbles at the very end, return the error.
authorTim Kientzle <kientzle@gmail.com>
Fri, 13 Nov 2009 07:11:45 +0000 (02:11 -0500)
committerTim Kientzle <kientzle@gmail.com>
Fri, 13 Nov 2009 07:11:45 +0000 (02:11 -0500)
Thanks to Michihiro NAKAJIMA and Clang Static Analyzer for pointing
out this oversight.

SVN-Revision: 1652

libarchive/archive_read_support_compression_gzip.c

index cd21c61293b9a8b14e4bb4494bf25a5f60fb03dd..52e818a11ff9fbd9d215f1dcb6c0b953500e364b 100644 (file)
@@ -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. */