]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Compare 'avail' to 0, not ARCHIVE_OK. (A zero value here
authorTim Kientzle <kientzle@gmail.com>
Mon, 15 Jun 2009 06:19:38 +0000 (02:19 -0400)
committerTim Kientzle <kientzle@gmail.com>
Mon, 15 Jun 2009 06:19:38 +0000 (02:19 -0400)
represents the number of bytes available, not a success status.)

SVN-Revision: 1169

libarchive/archive_read.c

index c211dd1bcf65c027029bbb8134432c98080559e2..858f8ee07bb19f2de63cf6bdb1a3bae5aba57dbf 100644 (file)
@@ -384,7 +384,8 @@ build_stream(struct archive_read *a)
                }
                /* Verify the filter by asking it for some data. */
                __archive_read_filter_ahead(filter, 1, &avail);
-               if (avail < ARCHIVE_OK) {
+               if (avail < 0) {
+                       /* If the read failed, bail out now. */
                        free(filter);
                        return (avail);
                }