From af434c9068bb2d262bf6a70872b6c6e6c607fb92 Mon Sep 17 00:00:00 2001 From: mm Date: Thu, 18 May 2017 19:50:15 +0000 Subject: [PATCH] MFC r317782,318181: MFC r317782 (mm): Sync libarchive with vendor Vendor changes (FreeBSD-related): PR 897: add test for ZIP archives with invalid EOCD headers PR 901: fix invalid renaming of sparse files OSS-Fuzz issue 497: remove fallback tree in LZX decoder OSS-Fuzz issue 527: rewrite expressions in lz4 filter OSS-Fuzz issue 577: fix integer overflow in cpio reader OSS-Fuzz issue 862: fix numerc parsing in mtree reader OSS-Fuzz issue 1097: fix undefined shift in rar reader cpio: various optimizations and memory leak fixes MFC r318181 (ngie) (2): cpio/tests/test_option_lz4: fix a use after free in the failure case Reported by: Coverity (2) Sponsored by: Dell EMC Isilon (2) git-svn-id: svn://svn.freebsd.org/base/stable/10@318483 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/libarchive/cpio/cpio.c | 13 +- .../cpio/test/test_option_Z_upper.c | 5 +- contrib/libarchive/cpio/test/test_option_a.c | 3 +- .../cpio/test/test_option_b64encode.c | 2 + .../libarchive/cpio/test/test_option_grzip.c | 3 +- .../libarchive/cpio/test/test_option_lrzip.c | 3 +- .../libarchive/cpio/test/test_option_lz4.c | 7 + .../libarchive/cpio/test/test_option_lzma.c | 4 + .../libarchive/cpio/test/test_option_lzop.c | 3 +- .../cpio/test/test_option_uuencode.c | 2 + contrib/libarchive/cpio/test/test_option_xz.c | 4 + contrib/libarchive/cpio/test/test_option_y.c | 6 +- contrib/libarchive/cpio/test/test_option_z.c | 3 +- .../libarchive/archive_entry_sparse.c | 4 +- .../libarchive/libarchive/archive_getdate.c | 2 +- .../libarchive/archive_openssl_hmac_private.h | 2 +- contrib/libarchive/libarchive/archive_read.c | 3 +- .../archive_read_disk_entry_from_file.c | 9 +- .../archive_read_support_filter_lz4.c | 6 +- .../archive_read_support_format_cab.c | 154 ++--------------- .../archive_read_support_format_cpio.c | 2 +- .../archive_read_support_format_iso9660.c | 5 +- .../archive_read_support_format_mtree.c | 163 ++++++------------ .../archive_read_support_format_rar.c | 2 +- .../libarchive/libarchive/archive_string.c | 3 +- .../libarchive/archive_write_set_format_pax.c | 17 +- .../libarchive/libarchive_changes.3 | 1 + .../libarchive/test/test_read_format_mtree.c | 2 +- ...format_zip_with_invalid_traditional_eocd.c | 60 +++++++ ...t_zip_with_invalid_traditional_eocd.zip.uu | 14 ++ .../libarchive/test/test_write_format_pax.c | 14 +- .../test_write_format_zip_compression_store.c | 15 +- .../test/test_write_format_zip_large.c | 14 +- contrib/libarchive/libarchive/xxhash.c | 12 +- contrib/libarchive/test_utils/test_main.c | 2 + lib/libarchive/tests/Makefile | 2 + 36 files changed, 255 insertions(+), 311 deletions(-) create mode 100644 contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c create mode 100644 contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu diff --git a/contrib/libarchive/cpio/cpio.c b/contrib/libarchive/cpio/cpio.c index 42e26cdf0..cade82957 100644 --- a/contrib/libarchive/cpio/cpio.c +++ b/contrib/libarchive/cpio/cpio.c @@ -628,6 +628,7 @@ mode_out(struct cpio *cpio) blocks == 1 ? "block" : "blocks"); } archive_write_free(cpio->archive); + archive_entry_linkresolver_free(cpio->linkresolver); } static const char * @@ -1194,12 +1195,15 @@ mode_pass(struct cpio *cpio, const char *destdir) struct lafe_line_reader *lr; const char *p; int r; + size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - cpio->destdir = malloc(strlen(destdir) + 8); - strcpy(cpio->destdir, destdir); - if (destdir[strlen(destdir) - 1] != '/') - strcat(cpio->destdir, "/"); + destdir_len = strlen(destdir); + cpio->destdir = malloc(destdir_len + 8); + memcpy(cpio->destdir, destdir, destdir_len); + if (destdir_len == 0 || destdir[destdir_len - 1] != '/') + cpio->destdir[destdir_len++] = '/'; + cpio->destdir[destdir_len++] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) @@ -1240,6 +1244,7 @@ mode_pass(struct cpio *cpio, const char *destdir) } archive_write_free(cpio->archive); + free(cpio->pass_destpath); } /* diff --git a/contrib/libarchive/cpio/test/test_option_Z_upper.c b/contrib/libarchive/cpio/test/test_option_Z_upper.c index d69a85ea5..ff388427e 100644 --- a/contrib/libarchive/cpio/test/test_option_Z_upper.c +++ b/contrib/libarchive/cpio/test/test_option_Z_upper.c @@ -43,17 +43,18 @@ DEFINE_TEST(test_option_Z_upper) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without compress support"); + free(p); return; } failure("-Z option is broken"); assertEqualInt(r, 0); - goto done; + free(p); + return; } free(p); /* Check that the archive file has a compress signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x1f\x9d", 2); -done: free(p); } diff --git a/contrib/libarchive/cpio/test/test_option_a.c b/contrib/libarchive/cpio/test/test_option_a.c index af4b48e57..94bcc6a61 100644 --- a/contrib/libarchive/cpio/test/test_option_a.c +++ b/contrib/libarchive/cpio/test/test_option_a.c @@ -96,7 +96,8 @@ DEFINE_TEST(test_option_a) test_create(); /* Sanity check; verify that atimes really do get modified. */ - assert((p = slurpfile(NULL, "f0")) != NULL); + p = slurpfile(NULL, "f0"); + assert(p != NULL); free(p); assertEqualInt(0, stat("f0", &st)); if (st.st_atime == files[0].atime_sec) { diff --git a/contrib/libarchive/cpio/test/test_option_b64encode.c b/contrib/libarchive/cpio/test/test_option_b64encode.c index 8f6b4157c..7c15a8230 100644 --- a/contrib/libarchive/cpio/test/test_option_b64encode.c +++ b/contrib/libarchive/cpio/test/test_option_b64encode.c @@ -42,6 +42,7 @@ DEFINE_TEST(test_option_b64encode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin-base64 644", 16); + free(p); /* Archive it with uuencode only. */ assertEqualInt(0, @@ -51,4 +52,5 @@ DEFINE_TEST(test_option_b64encode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin-base64 644", 16); + free(p); } diff --git a/contrib/libarchive/cpio/test/test_option_grzip.c b/contrib/libarchive/cpio/test/test_option_grzip.c index dfce2e064..7e7dd2c8e 100644 --- a/contrib/libarchive/cpio/test/test_option_grzip.c +++ b/contrib/libarchive/cpio/test/test_option_grzip.c @@ -44,9 +44,10 @@ DEFINE_TEST(test_option_grzip) systemf("echo f | %s -o --grzip >archive.out 2>archive.err", testprog)); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); /* Check that the archive file has an grzip signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "GRZipII\x00\x02\x04:)", 12); + free(p); } diff --git a/contrib/libarchive/cpio/test/test_option_lrzip.c b/contrib/libarchive/cpio/test/test_option_lrzip.c index a84f75157..8d9c0d576 100644 --- a/contrib/libarchive/cpio/test/test_option_lrzip.c +++ b/contrib/libarchive/cpio/test/test_option_lrzip.c @@ -44,9 +44,10 @@ DEFINE_TEST(test_option_lrzip) systemf("echo f | %s -o --lrzip >archive.out 2>archive.err", testprog)); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); /* Check that the archive file has an lzma signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "LRZI\x00", 5); + free(p); } diff --git a/contrib/libarchive/cpio/test/test_option_lz4.c b/contrib/libarchive/cpio/test/test_option_lz4.c index afd683ddc..ebd376736 100644 --- a/contrib/libarchive/cpio/test/test_option_lz4.c +++ b/contrib/libarchive/cpio/test/test_option_lz4.c @@ -43,6 +43,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without lz4 support"); + free(p); return; } /* POSIX permits different handling of the spawnp @@ -52,6 +53,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Can't launch") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } /* Some systems successfully spawn the new process, @@ -61,6 +63,7 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Can't write") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } /* On some systems the error won't be detected until closing @@ -68,14 +71,18 @@ DEFINE_TEST(test_option_lz4) if (strstr(p, "Error closing") != NULL && !canLz4()) { skipping("This version of bsdcpio uses an external lz4 program " "but no such program is available on this system."); + free(p); return; } failure("--lz4 option is broken: %s", p); + free(p); assertEqualInt(r, 0); return; } + free(p); /* Check that the archive file has an lz4 signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x04\x22\x4d\x18", 4); + free(p); } diff --git a/contrib/libarchive/cpio/test/test_option_lzma.c b/contrib/libarchive/cpio/test/test_option_lzma.c index c6e335301..b7cad3d1e 100644 --- a/contrib/libarchive/cpio/test/test_option_lzma.c +++ b/contrib/libarchive/cpio/test/test_option_lzma.c @@ -43,14 +43,18 @@ DEFINE_TEST(test_option_lzma) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without lzma support"); + free(p); return; } failure("--lzma option is broken"); assertEqualInt(r, 0); + free(p); return; } + free(p); /* Check that the archive file has an lzma signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x5d\00\00", 3); + free(p); } diff --git a/contrib/libarchive/cpio/test/test_option_lzop.c b/contrib/libarchive/cpio/test/test_option_lzop.c index 9f1666e9c..aa40ef5b6 100644 --- a/contrib/libarchive/cpio/test/test_option_lzop.c +++ b/contrib/libarchive/cpio/test/test_option_lzop.c @@ -39,7 +39,7 @@ DEFINE_TEST(test_option_lzop) r = systemf("echo f | %s -o --lzop >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canLzop()) { skipping("lzop is not supported on this platform"); @@ -53,4 +53,5 @@ DEFINE_TEST(test_option_lzop) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a", 9); + free(p); } diff --git a/contrib/libarchive/cpio/test/test_option_uuencode.c b/contrib/libarchive/cpio/test/test_option_uuencode.c index ecf354f8f..a42a0e030 100644 --- a/contrib/libarchive/cpio/test/test_option_uuencode.c +++ b/contrib/libarchive/cpio/test/test_option_uuencode.c @@ -42,6 +42,7 @@ DEFINE_TEST(test_option_uuencode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin 644", 9); + free(p); /* Archive it with uuencode only. */ assertEqualInt(0, @@ -51,4 +52,5 @@ DEFINE_TEST(test_option_uuencode) p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "begin 644", 9); + free(p); } diff --git a/contrib/libarchive/cpio/test/test_option_xz.c b/contrib/libarchive/cpio/test/test_option_xz.c index 02b5dfaad..f0d3b33d4 100644 --- a/contrib/libarchive/cpio/test/test_option_xz.c +++ b/contrib/libarchive/cpio/test/test_option_xz.c @@ -44,14 +44,18 @@ DEFINE_TEST(test_option_xz) if (strstr(p, "compression not available") != NULL) { skipping("This version of bsdcpio was compiled " "without xz support"); + free(p); return; } + free(p); failure("--xz option is broken"); assertEqualInt(r, 0); return; } + free(p); /* Check that the archive file has an xz signature. */ p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "\xFD\x37\x7A\x58\x5A\x00", 6); + free(p); } diff --git a/contrib/libarchive/cpio/test/test_option_y.c b/contrib/libarchive/cpio/test/test_option_y.c index 75c956388..ddb498ffc 100644 --- a/contrib/libarchive/cpio/test/test_option_y.c +++ b/contrib/libarchive/cpio/test/test_option_y.c @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_y) r = systemf("echo f | %s -oy >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canBzip2()) { skipping("bzip2 is not supported on this platform"); @@ -46,14 +46,12 @@ DEFINE_TEST(test_option_y) } failure("-y option is broken"); assertEqualInt(r, 0); - goto done; + return; } assertTextFileContents("1 block\n", "archive.err"); /* Check that the archive file has a bzip2 signature. */ - free(p); p = slurpfile(&s, "archive.out"); assert(s > 2); assertEqualMem(p, "BZh9", 4); -done: free(p); } diff --git a/contrib/libarchive/cpio/test/test_option_z.c b/contrib/libarchive/cpio/test/test_option_z.c index 0b68a42ba..803232d04 100644 --- a/contrib/libarchive/cpio/test/test_option_z.c +++ b/contrib/libarchive/cpio/test/test_option_z.c @@ -38,7 +38,7 @@ DEFINE_TEST(test_option_z) r = systemf("echo f | %s -oz >archive.out 2>archive.err", testprog); p = slurpfile(&s, "archive.err"); - p[s] = '\0'; + free(p); if (r != 0) { if (!canGzip()) { skipping("gzip is not supported on this platform"); @@ -52,4 +52,5 @@ DEFINE_TEST(test_option_z) p = slurpfile(&s, "archive.out"); assert(s > 4); assertEqualMem(p, "\x1f\x8b\x08\x00", 4); + free(p); } diff --git a/contrib/libarchive/libarchive/archive_entry_sparse.c b/contrib/libarchive/libarchive/archive_entry_sparse.c index fed74f512..74917b37b 100644 --- a/contrib/libarchive/libarchive/archive_entry_sparse.c +++ b/contrib/libarchive/libarchive/archive_entry_sparse.c @@ -51,7 +51,7 @@ archive_entry_sparse_clear(struct archive_entry *entry) void archive_entry_sparse_add_entry(struct archive_entry *entry, - int64_t offset, int64_t length) + la_int64_t offset, la_int64_t length) { struct ae_sparse *sp; @@ -135,7 +135,7 @@ archive_entry_sparse_reset(struct archive_entry * entry) int archive_entry_sparse_next(struct archive_entry * entry, - int64_t *offset, int64_t *length) + la_int64_t *offset, la_int64_t *length) { if (entry->sparse_p) { *offset = entry->sparse_p->offset; diff --git a/contrib/libarchive/libarchive/archive_getdate.c b/contrib/libarchive/libarchive/archive_getdate.c index fe43ae820..030c083ce 100644 --- a/contrib/libarchive/libarchive/archive_getdate.c +++ b/contrib/libarchive/libarchive/archive_getdate.c @@ -691,7 +691,7 @@ Convert(time_t Month, time_t Day, time_t Year, time_t Hours, time_t Minutes, time_t Seconds, time_t Timezone, enum DSTMODE DSTmode) { - int DaysInMonth[12] = { + signed char DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; time_t Julian; diff --git a/contrib/libarchive/libarchive/archive_openssl_hmac_private.h b/contrib/libarchive/libarchive/archive_openssl_hmac_private.h index 2deeb5f55..59f95b80a 100644 --- a/contrib/libarchive/libarchive/archive_openssl_hmac_private.h +++ b/contrib/libarchive/libarchive/archive_openssl_hmac_private.h @@ -28,7 +28,7 @@ #include #include -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) #include /* malloc, free */ #include /* memset */ static inline HMAC_CTX *HMAC_CTX_new(void) diff --git a/contrib/libarchive/libarchive/archive_read.c b/contrib/libarchive/libarchive/archive_read.c index dc89ee57b..a29173e83 100644 --- a/contrib/libarchive/libarchive/archive_read.c +++ b/contrib/libarchive/libarchive/archive_read.c @@ -881,7 +881,8 @@ archive_read_data(struct archive *_a, void *buff, size_t s) len = a->read_data_remaining; if (len > s) len = s; - memcpy(dest, a->read_data_block, len); + if (len) + memcpy(dest, a->read_data_block, len); s -= len; a->read_data_block += len; a->read_data_remaining -= len; diff --git a/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c b/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c index 9d845fa0e..89c8fd066 100644 --- a/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c +++ b/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c @@ -916,11 +916,10 @@ setup_sparse(struct archive_read_disk *a, return (ARCHIVE_OK); /* Does filesystem support the reporting of hole ? */ - if (*fd < 0) { + if (*fd < 0) path = archive_read_disk_entry_setup_path(a, entry, fd); - if (path == NULL) - return (ARCHIVE_FAILED); - } + else + path = NULL; if (*fd >= 0) { #ifdef _PC_MIN_HOLE_SIZE @@ -931,6 +930,8 @@ setup_sparse(struct archive_read_disk *a, if (initial_off != 0) lseek(*fd, 0, SEEK_SET); } else { + if (path == NULL) + return (ARCHIVE_FAILED); #ifdef _PC_MIN_HOLE_SIZE if (pathconf(path, _PC_MIN_HOLE_SIZE) <= 0) return (ARCHIVE_OK); diff --git a/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c b/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c index 663e2d3d6..147f5027f 100644 --- a/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c +++ b/contrib/libarchive/libarchive/archive_read_support_filter_lz4.c @@ -494,7 +494,7 @@ lz4_filter_read_data_block(struct archive_read_filter *self, const void **p) if (read_buf == NULL) goto truncated_error; compressed_size = archive_le32dec(read_buf); - if ((compressed_size & ~(1 << 31)) > state->flags.block_maximum_size) + if ((compressed_size & 0x7fffffff) > state->flags.block_maximum_size) goto malformed_error; /* A compressed size == 0 means the end of stream blocks. */ if (compressed_size == 0) { @@ -504,8 +504,8 @@ lz4_filter_read_data_block(struct archive_read_filter *self, const void **p) checksum_size = state->flags.block_checksum; /* Check if the block is uncompressed. */ - if (compressed_size & (1 << 31)) { - compressed_size &= ~(1 << 31); + if (compressed_size & 0x80000000U) { + compressed_size &= 0x7fffffff; uncompressed_size = compressed_size; } else uncompressed_size = 0;/* Unknown yet. */ diff --git a/contrib/libarchive/libarchive/archive_read_support_format_cab.c b/contrib/libarchive/libarchive/archive_read_support_format_cab.c index 2cf0d453a..e5ff5a12c 100644 --- a/contrib/libarchive/libarchive/archive_read_support_format_cab.c +++ b/contrib/libarchive/libarchive/archive_read_support_format_cab.c @@ -116,19 +116,11 @@ struct lzx_dec { * coding tree, which is a binary tree. But a use of a large * index table causes L1 cache read miss many times. */ -#define HTBL_BITS 10 int max_bits; - int shift_bits; int tbl_bits; int tree_used; - int tree_avail; /* Direct access table. */ uint16_t *tbl; - /* Binary tree table for extra bits over the direct access. */ - struct htree_t { - uint16_t left; - uint16_t right; - } *tree; } at, lt, mt, pt; int loop; @@ -352,7 +344,6 @@ static int lzx_huffman_init(struct huffman *, size_t, int); static void lzx_huffman_free(struct huffman *); static int lzx_make_huffman_table(struct huffman *); static inline int lzx_decode_huffman(struct huffman *, unsigned); -static int lzx_decode_huffman_tree(struct huffman *, unsigned, int); int @@ -3127,7 +3118,6 @@ lzx_read_bitlen(struct lzx_stream *strm, struct huffman *d, int end) static int lzx_huffman_init(struct huffman *hf, size_t len_size, int tbl_bits) { - int bits; if (hf->bitlen == NULL || hf->len_size != (int)len_size) { free(hf->bitlen); @@ -3138,21 +3128,11 @@ lzx_huffman_init(struct huffman *hf, size_t len_size, int tbl_bits) } else memset(hf->bitlen, 0, len_size * sizeof(hf->bitlen[0])); if (hf->tbl == NULL) { - if (tbl_bits < HTBL_BITS) - bits = tbl_bits; - else - bits = HTBL_BITS; - hf->tbl = malloc(((size_t)1 << bits) * sizeof(hf->tbl[0])); + hf->tbl = malloc(((size_t)1 << tbl_bits) * sizeof(hf->tbl[0])); if (hf->tbl == NULL) return (ARCHIVE_FATAL); hf->tbl_bits = tbl_bits; } - if (hf->tree == NULL && tbl_bits > HTBL_BITS) { - hf->tree_avail = 1 << (tbl_bits - HTBL_BITS + 4); - hf->tree = malloc(hf->tree_avail * sizeof(hf->tree[0])); - if (hf->tree == NULL) - return (ARCHIVE_FATAL); - } return (ARCHIVE_OK); } @@ -3161,7 +3141,6 @@ lzx_huffman_free(struct huffman *hf) { free(hf->bitlen); free(hf->tbl); - free(hf->tree); } /* @@ -3174,7 +3153,7 @@ lzx_make_huffman_table(struct huffman *hf) const unsigned char *bitlen; int bitptn[17], weight[17]; int i, maxbits = 0, ptn, tbl_size, w; - int diffbits, len_avail; + int len_avail; /* * Initialize bit patterns. @@ -3205,28 +3184,11 @@ lzx_make_huffman_table(struct huffman *hf) weight[i] >>= ebits; } } - if (maxbits > HTBL_BITS) { - int htbl_max; - uint16_t *p; - - diffbits = maxbits - HTBL_BITS; - for (i = 1; i <= HTBL_BITS; i++) { - bitptn[i] >>= diffbits; - weight[i] >>= diffbits; - } - htbl_max = bitptn[HTBL_BITS] + - weight[HTBL_BITS] * hf->freq[HTBL_BITS]; - p = &(hf->tbl[htbl_max]); - while (p < &hf->tbl[1U<shift_bits = diffbits; /* * Make the table. */ - tbl_size = 1 << HTBL_BITS; + tbl_size = 1 << hf->tbl_bits; tbl = hf->tbl; bitlen = hf->bitlen; len_avail = hf->len_size; @@ -3234,120 +3196,32 @@ lzx_make_huffman_table(struct huffman *hf) for (i = 0; i < len_avail; i++) { uint16_t *p; int len, cnt; - uint16_t bit; - int extlen; - struct htree_t *ht; if (bitlen[i] == 0) continue; /* Get a bit pattern */ len = bitlen[i]; + if (len > tbl_size) + return (0); ptn = bitptn[len]; cnt = weight[len]; - if (len <= HTBL_BITS) { - /* Calculate next bit pattern */ - if ((bitptn[len] = ptn + cnt) > tbl_size) - return (0);/* Invalid */ - /* Update the table */ - p = &(tbl[ptn]); - while (--cnt >= 0) - p[cnt] = (uint16_t)i; - continue; - } - - /* - * A bit length is too big to be housed to a direct table, - * so we use a tree model for its extra bits. - */ - bitptn[len] = ptn + cnt; - bit = 1U << (diffbits -1); - extlen = len - HTBL_BITS; - - p = &(tbl[ptn >> diffbits]); - if (*p == 0) { - *p = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - if (*p < len_avail || - *p >= (len_avail + hf->tree_used)) - return (0);/* Invalid */ - ht = &(hf->tree[*p - len_avail]); - } - while (--extlen > 0) { - if (ptn & bit) { - if (ht->left < len_avail) { - ht->left = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->left - len_avail]); - } - } else { - if (ht->right < len_avail) { - ht->right = len_avail + hf->tree_used; - ht = &(hf->tree[hf->tree_used++]); - if (hf->tree_used > hf->tree_avail) - return (0);/* Invalid */ - ht->left = 0; - ht->right = 0; - } else { - ht = &(hf->tree[ht->right - len_avail]); - } - } - bit >>= 1; - } - if (ptn & bit) { - if (ht->left != 0) - return (0);/* Invalid */ - ht->left = (uint16_t)i; - } else { - if (ht->right != 0) - return (0);/* Invalid */ - ht->right = (uint16_t)i; - } + /* Calculate next bit pattern */ + if ((bitptn[len] = ptn + cnt) > tbl_size) + return (0);/* Invalid */ + /* Update the table */ + p = &(tbl[ptn]); + while (--cnt >= 0) + p[cnt] = (uint16_t)i; } return (1); } -static int -lzx_decode_huffman_tree(struct huffman *hf, unsigned rbits, int c) -{ - struct htree_t *ht; - int extlen; - - ht = hf->tree; - extlen = hf->shift_bits; - while (c >= hf->len_size) { - c -= hf->len_size; - if (extlen-- <= 0 || c >= hf->tree_used) - return (0); - if (rbits & (1U << extlen)) - c = ht[c].left; - else - c = ht[c].right; - } - return (c); -} - static inline int lzx_decode_huffman(struct huffman *hf, unsigned rbits) { int c; - /* - * At first search an index table for a bit pattern. - * If it fails, search a huffman tree for. - */ - c = hf->tbl[rbits >> hf->shift_bits]; + c = hf->tbl[rbits]; if (c < hf->len_size) return (c); - /* This bit pattern needs to be found out at a huffman tree. */ - return (lzx_decode_huffman_tree(hf, rbits, c)); + return (0); } - diff --git a/contrib/libarchive/libarchive/archive_read_support_format_cpio.c b/contrib/libarchive/libarchive/archive_read_support_format_cpio.c index 43e6ff93d..6b4d241fd 100644 --- a/contrib/libarchive/libarchive/archive_read_support_format_cpio.c +++ b/contrib/libarchive/libarchive/archive_read_support_format_cpio.c @@ -165,7 +165,7 @@ __FBSDID("$FreeBSD$"); struct links_entry { struct links_entry *next; struct links_entry *previous; - int links; + unsigned int links; dev_t dev; int64_t ino; char *name; diff --git a/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c b/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c index ebbfc2fa5..36549a38f 100644 --- a/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c +++ b/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c @@ -3021,8 +3021,9 @@ heap_add_entry(struct archive_read *a, struct heap_queue *heap, ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); + if (heap->allocated) + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); if (heap->files != NULL) free(heap->files); heap->files = new_pending_files; diff --git a/contrib/libarchive/libarchive/archive_read_support_format_mtree.c b/contrib/libarchive/libarchive/archive_read_support_format_mtree.c index 72de1dcb0..d2770f1cf 100644 --- a/contrib/libarchive/libarchive/archive_read_support_format_mtree.c +++ b/contrib/libarchive/libarchive/archive_read_support_format_mtree.c @@ -130,9 +130,7 @@ static ssize_t readline(struct archive_read *, struct mtree *, char **, ssize_t) static int skip(struct archive_read *a); static int read_header(struct archive_read *, struct archive_entry *); -static int64_t mtree_atol10(char **); -static int64_t mtree_atol8(char **); -static int64_t mtree_atol(char **); +static int64_t mtree_atol(char **, int base); /* * There's no standard for TIME_T_MAX/TIME_T_MIN. So we compute them @@ -1418,7 +1416,7 @@ parse_device(dev_t *pdev, struct archive *a, char *val) "Too many arguments"); return ARCHIVE_WARN; } - numbers[argc++] = (unsigned long)mtree_atol(&p); + numbers[argc++] = (unsigned long)mtree_atol(&p, 0); } if (argc < 2) { archive_set_error(a, ARCHIVE_ERRNO_FILE_FORMAT, @@ -1433,7 +1431,7 @@ parse_device(dev_t *pdev, struct archive *a, char *val) } } else { /* file system raw value. */ - result = (dev_t)mtree_atol(&val); + result = (dev_t)mtree_atol(&val, 0); } *pdev = result; return ARCHIVE_OK; @@ -1513,7 +1511,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, case 'g': if (strcmp(key, "gid") == 0) { *parsed_kws |= MTREE_HAS_GID; - archive_entry_set_gid(entry, mtree_atol10(&val)); + archive_entry_set_gid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "gname") == 0) { @@ -1523,7 +1521,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, } case 'i': if (strcmp(key, "inode") == 0) { - archive_entry_set_ino(entry, mtree_atol10(&val)); + archive_entry_set_ino(entry, mtree_atol(&val, 10)); break; } case 'l': @@ -1535,14 +1533,14 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, if (strcmp(key, "md5") == 0 || strcmp(key, "md5digest") == 0) break; if (strcmp(key, "mode") == 0) { - if (val[0] >= '0' && val[0] <= '9') { + if (val[0] >= '0' && val[0] <= '7') { *parsed_kws |= MTREE_HAS_PERM; archive_entry_set_perm(entry, - (mode_t)mtree_atol8(&val)); + (mode_t)mtree_atol(&val, 8)); } else { archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Symbolic mode \"%s\" unsupported", val); + "Symbolic or non-octal mode \"%s\" unsupported", val); return ARCHIVE_WARN; } break; @@ -1551,7 +1549,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, if (strcmp(key, "nlink") == 0) { *parsed_kws |= MTREE_HAS_NLINK; archive_entry_set_nlink(entry, - (unsigned int)mtree_atol10(&val)); + (unsigned int)mtree_atol(&val, 10)); break; } case 'r': @@ -1582,7 +1580,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, strcmp(key, "sha512digest") == 0) break; if (strcmp(key, "size") == 0) { - archive_entry_set_size(entry, mtree_atol10(&val)); + archive_entry_set_size(entry, mtree_atol(&val, 10)); break; } case 't': @@ -1601,13 +1599,13 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, long ns = 0; *parsed_kws |= MTREE_HAS_MTIME; - m = mtree_atol10(&val); + m = mtree_atol(&val, 10); /* Replicate an old mtree bug: * 123456789.1 represents 123456789 * seconds and 1 nanosecond. */ if (*val == '.') { ++val; - ns = (long)mtree_atol10(&val); + ns = (long)mtree_atol(&val, 10); if (ns < 0) ns = 0; else if (ns > 999999999) @@ -1670,7 +1668,7 @@ parse_keyword(struct archive_read *a, struct mtree *mtree, case 'u': if (strcmp(key, "uid") == 0) { *parsed_kws |= MTREE_HAS_UID; - archive_entry_set_uid(entry, mtree_atol10(&val)); + archive_entry_set_uid(entry, mtree_atol(&val, 10)); break; } if (strcmp(key, "uname") == 0) { @@ -1825,77 +1823,9 @@ parse_escapes(char *src, struct mtree_entry *mentry) *dest = '\0'; } -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - */ -static int64_t -mtree_atol8(char **p) -{ - int64_t l, limit, last_digit_limit; - int digit, base; - - base = 8; - limit = INT64_MAX / base; - last_digit_limit = INT64_MAX % base; - - l = 0; - digit = **p - '0'; - while (digit >= 0 && digit < base) { - if (l>limit || (l == limit && digit > last_digit_limit)) { - l = INT64_MAX; /* Truncate on overflow. */ - break; - } - l = (l * base) + digit; - digit = *++(*p) - '0'; - } - return (l); -} - -/* - * Note that this implementation does not (and should not!) obey - * locale settings; you cannot simply substitute strtol here, since - * it does obey locale. - * - * Convert the number pointed to by 'p' into a 64-bit signed integer. - * On return, 'p' points to the first non-digit following the number. - * On overflow, the function returns INT64_MIN or INT64_MAX. - */ -static int64_t -mtree_atol10(char **p) -{ - const int base = 10; - const int64_t limit = INT64_MAX / base; - const int64_t last_digit_limit = INT64_MAX % base; - int64_t l; - int sign; - - if (**p == '-') { - sign = -1; - ++(*p); - } else { - sign = 1; - } - - l = 0; - while (**p >= '0' && **p < '0' + base) { - int digit = **p - '0'; - if (l > limit || (l == limit && digit > last_digit_limit)) { - while (**p >= '0' && **p < '0' + base) { - ++(*p); - } - return (sign < 0) ? INT64_MIN : INT64_MAX; - } - l = (l * base) + digit; - ++(*p); - } - return (sign < 0) ? -l : l; -} - /* Parse a hex digit. */ static int -parsehex(char c) +parsedigit(char c) { if (c >= '0' && c <= '9') return c - '0'; @@ -1913,45 +1843,50 @@ parsehex(char c) * it does obey locale. */ static int64_t -mtree_atol16(char **p) +mtree_atol(char **p, int base) { - int64_t l, limit, last_digit_limit; - int base, digit, sign; - - base = 16; + int64_t l, limit; + int digit, last_digit_limit; + + if (base == 0) { + if (**p != '0') + base = 10; + else if ((*p)[1] == 'x' || (*p)[1] == 'X') { + *p += 2; + base = 16; + } else { + base = 8; + } + } if (**p == '-') { - sign = -1; - limit = ((uint64_t)(INT64_MAX) + 1) / base; - last_digit_limit = ((uint64_t)(INT64_MAX) + 1) % base; + limit = INT64_MIN / base; + last_digit_limit = INT64_MIN % base; ++(*p); + + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l < limit || (l == limit && digit > last_digit_limit)) + return INT64_MIN; + l = (l * base) - digit; + digit = parsedigit(*++(*p)); + } + return l; } else { - sign = 1; limit = INT64_MAX / base; last_digit_limit = INT64_MAX % base; - } - l = 0; - digit = parsehex(**p); - while (digit >= 0 && digit < base) { - if (l > limit || (l == limit && digit > last_digit_limit)) - return (sign < 0) ? INT64_MIN : INT64_MAX; - l = (l * base) + digit; - digit = parsehex(*++(*p)); - } - return (sign < 0) ? -l : l; -} - -static int64_t -mtree_atol(char **p) -{ - if (**p != '0') - return mtree_atol10(p); - if ((*p)[1] == 'x' || (*p)[1] == 'X') { - *p += 2; - return mtree_atol16(p); + l = 0; + digit = parsedigit(**p); + while (digit >= 0 && digit < base) { + if (l > limit || (l == limit && digit > last_digit_limit)) + return INT64_MAX; + l = (l * base) + digit; + digit = parsedigit(*++(*p)); + } + return l; } - return mtree_atol8(p); } /* diff --git a/contrib/libarchive/libarchive/archive_read_support_format_rar.c b/contrib/libarchive/libarchive/archive_read_support_format_rar.c index 1e9849fdd..cbb14c32d 100644 --- a/contrib/libarchive/libarchive/archive_read_support_format_rar.c +++ b/contrib/libarchive/libarchive/archive_read_support_format_rar.c @@ -1750,7 +1750,7 @@ read_exttime(const char *p, struct rar *rar, const char *endp) return (-1); for (j = 0; j < count; j++) { - rem = ((*p) << 16) | (rem >> 8); + rem = (((unsigned)(unsigned char)*p) << 16) | (rem >> 8); p++; } tm = localtime(&t); diff --git a/contrib/libarchive/libarchive/archive_string.c b/contrib/libarchive/libarchive/archive_string.c index f738c549f..3501a9e09 100644 --- a/contrib/libarchive/libarchive/archive_string.c +++ b/contrib/libarchive/libarchive/archive_string.c @@ -202,7 +202,8 @@ archive_string_append(struct archive_string *as, const char *p, size_t s) { if (archive_string_ensure(as, as->length + s + 1) == NULL) return (NULL); - memmove(as->s + as->length, p, s); + if (s) + memmove(as->s + as->length, p, s); as->length += s; as->s[as->length] = 0; return (as); diff --git a/contrib/libarchive/libarchive/archive_write_set_format_pax.c b/contrib/libarchive/libarchive/archive_write_set_format_pax.c index da4fe975f..318ca78c5 100644 --- a/contrib/libarchive/libarchive/archive_write_set_format_pax.c +++ b/contrib/libarchive/libarchive/archive_write_set_format_pax.c @@ -1196,8 +1196,12 @@ archive_write_pax_header(struct archive_write *a, "GNU.sparse.major", 1); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.minor", 0); + /* + * Make sure to store the original path, since + * truncation to ustar limit happened already. + */ add_pax_attr(&(pax->pax_header), - "GNU.sparse.name", entry_name.s); + "GNU.sparse.name", path); add_pax_attr_int(&(pax->pax_header), "GNU.sparse.realsize", archive_entry_size(entry_main)); @@ -1650,13 +1654,14 @@ build_pax_attribute_name(char *dest, const char *src) * GNU PAX Format 1.0 requires the special name, which pattern is: * /GNUSparseFile./ * + * Since reproducable archives are more important, use 0 as pid. + * * This function is used for only Sparse file, a file type of which * is regular file. */ static char * build_gnu_sparse_name(char *dest, const char *src) { - char buff[64]; const char *p; /* Handle the null filename case. */ @@ -1682,15 +1687,9 @@ build_gnu_sparse_name(char *dest, const char *src) break; } -#if HAVE_GETPID && 0 /* Disable this as pax attribute name. */ - sprintf(buff, "GNUSparseFile.%d", getpid()); -#else - /* If the platform can't fetch the pid, don't include it. */ - strcpy(buff, "GNUSparseFile"); -#endif /* General case: build a ustar-compatible name adding * "/GNUSparseFile/". */ - build_ustar_entry_name(dest, src, p - src, buff); + build_ustar_entry_name(dest, src, p - src, "GNUSparseFile.0"); return (dest); } diff --git a/contrib/libarchive/libarchive/libarchive_changes.3 b/contrib/libarchive/libarchive/libarchive_changes.3 index 881a67cdd..adc87febd 100644 --- a/contrib/libarchive/libarchive/libarchive_changes.3 +++ b/contrib/libarchive/libarchive/libarchive_changes.3 @@ -28,6 +28,7 @@ .Dt LIBARCHIVE_CHANGES 3 .Os .Sh NAME +.Nm libarchive_changes .Nd changes in libarchive interface .\" .Sh CHANGES IN LIBARCHIVE 3 diff --git a/contrib/libarchive/libarchive/test/test_read_format_mtree.c b/contrib/libarchive/libarchive/test/test_read_format_mtree.c index 80881a847..f6f71a361 100644 --- a/contrib/libarchive/libarchive/test/test_read_format_mtree.c +++ b/contrib/libarchive/libarchive/test/test_read_format_mtree.c @@ -183,7 +183,7 @@ test_read_format_mtree1(void) min_time = archive_entry_mtime(ae); assert(min_time <= 0); /* Simply asserting min_time - 1 > 0 breaks with some compiler optimizations. */ - t = min_time - 1; + t = (time_t)((uintmax_t)min_time - 1); assert(t > 0); assertEqualInt(archive_entry_is_encrypted(ae), 0); assertEqualIntA(a, archive_read_has_encrypted_entries(a), ARCHIVE_READ_FORMAT_ENCRYPTION_UNSUPPORTED); diff --git a/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c b/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c new file mode 100644 index 000000000..dc94f94f1 --- /dev/null +++ b/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.c @@ -0,0 +1,60 @@ +/*- + * Copyright (c) 2017 Phillip Berndt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "test.h" +__FBSDID("$FreeBSD$"); + +/* + * Issue 869: zip files without a valid EOCD header aren't loaded even if they + * have a valid ZIP64 version of said header. + */ + +DEFINE_TEST(test_read_format_zip_with_invalid_traditional_eocd) +{ + const char *refname = "test_read_format_zip_with_invalid_traditional_eocd.zip"; + char *p; + size_t s; + struct archive *a; + struct archive_entry *ae; + + extract_reference_file(refname); + p = slurpfile(&s, refname); + + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip_seekable(a)); + assertEqualIntA(a, ARCHIVE_OK, read_open_memory_seek(a, p, s, 1)); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("test1.txt", archive_entry_pathname(ae)); + assertEqualInt(0, archive_entry_size(ae)); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("test2.txt", archive_entry_pathname(ae)); + assertEqualInt(0, archive_entry_size(ae)); + + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); + free(p); +} diff --git a/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu b/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu new file mode 100644 index 000000000..63744f145 --- /dev/null +++ b/contrib/libarchive/libarchive/test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu @@ -0,0 +1,14 @@ +begin 644 test_read_format_zip_without_eocd.zip +M4$L#!"T`"````-IT@DH`````__________\)`"``=&5S=#$N='AT`0`<```` +M```````````````````````````````````````````````````````````` +M`%!+`P0M``@```#:=()*`````/__________"0`@`'1Ev) - /**************************************** ** Compiler-specific Functions and Macros *****************************************/ -#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) +#define GCC_VERSION ((__GNUC__-0) * 100 + (__GNUC_MINOR__ - 0)) + +#if GCC_VERSION >= 409 +__attribute__((__no_sanitize_undefined__)) +#endif +static inline U32 A32(const void * x) +{ + return (((const U32_S *)(x))->v); +} /* Note : although _rotl exists for minGW (GCC under windows), performance seems poor */ #if defined(_MSC_VER) diff --git a/contrib/libarchive/test_utils/test_main.c b/contrib/libarchive/test_utils/test_main.c index 36dfc82fa..6ece5e332 100644 --- a/contrib/libarchive/test_utils/test_main.c +++ b/contrib/libarchive/test_utils/test_main.c @@ -1102,6 +1102,7 @@ assertion_file_contains_lines_any_order(const char *file, int line, failure_start(pathname, line, "Can't allocate memory"); failure_finish(NULL); free(expected); + free(buff); return (0); } for (i = 0; lines[i] != NULL; ++i) { @@ -1124,6 +1125,7 @@ assertion_file_contains_lines_any_order(const char *file, int line, failure_start(pathname, line, "Can't allocate memory"); failure_finish(NULL); free(expected); + free(buff); return (0); } for (j = 0, p = buff; p < buff + buff_size; diff --git a/lib/libarchive/tests/Makefile b/lib/libarchive/tests/Makefile index 904f86791..0dc80dfad 100644 --- a/lib/libarchive/tests/Makefile +++ b/lib/libarchive/tests/Makefile @@ -194,6 +194,7 @@ TESTS_SRCS= \ test_read_format_zip_traditional_encryption_data.c \ test_read_format_zip_winzip_aes.c \ test_read_format_zip_winzip_aes_large.c \ + test_read_format_zip_with_invalid_traditional_eocd.c \ test_read_format_zip_zip64.c \ test_read_large.c \ test_read_pax_truncated.c \ @@ -541,6 +542,7 @@ FILES+= test_read_format_zip_sfx.uu FILES+= test_read_format_zip_symlink.zip.uu FILES+= test_read_format_zip_traditional_encryption_data.zip.uu FILES+= test_read_format_zip_ux.zip.uu +FILES+= test_read_format_zip_with_invalid_traditional_eocd.zip.uu FILES+= test_read_format_zip_winzip_aes128.zip.uu FILES+= test_read_format_zip_winzip_aes256.zip.uu FILES+= test_read_format_zip_winzip_aes256_large.zip.uu -- 2.45.0