]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
zip size entry of -1 should be treated the same as 0 1639/head
authorTodd Richmond <todd_richmond@hotmail.com>
Sat, 18 Dec 2021 00:59:05 +0000 (16:59 -0800)
committerTodd Richmond <todd_richmond@hotmail.com>
Sat, 18 Dec 2021 00:59:05 +0000 (16:59 -0800)
libarchive/archive_read_support_format_zip.c

index 5d9588584b36e98756a51bb8bb3bc7bbc7e51d8a..b73afd19cb1813597f2409f51540678d74f6dda6 100644 (file)
@@ -1144,7 +1144,8 @@ zip_read_local_file_header(struct archive_read *a, struct archive_entry *entry,
                            (intmax_t)zip_entry->compressed_size);
                        ret = ARCHIVE_WARN;
                }
-               if (zip_entry->uncompressed_size == 0) {
+               if (zip_entry->uncompressed_size == 0 ||
+                       zip_entry->uncompressed_size == 0xffffffff) {
                        zip_entry->uncompressed_size
                            = zip_entry_central_dir.uncompressed_size;
                } else if (zip_entry->uncompressed_size