From 61d60ab700ee2f567fd9bc0713c8bcdd5f1a1c33 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Thu, 26 Dec 2013 19:39:59 -0800 Subject: [PATCH] Don't try to verify deflated data if zlib is unavailable. --- .../test/test_write_format_zip_empty_zip64.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/libarchive/test/test_write_format_zip_empty_zip64.c b/libarchive/test/test_write_format_zip_empty_zip64.c index a1802453e..3efdf62e8 100644 --- a/libarchive/test/test_write_format_zip_empty_zip64.c +++ b/libarchive/test/test_write_format_zip_empty_zip64.c @@ -60,17 +60,24 @@ DEFINE_TEST(test_write_format_zip_empty_zip64) "\x2d\0" /* Extract with Zip 4.5 or later */ "\0\0\0\0" /* This is disk #0 */ "\0\0\0\0" /* Central dir starts on disk #0 */ - "\0\0\0\0\0\0\0\0" /* There are 0 entries in directory on this disk*/ - "\0\0\0\0\0\0\0\0" /* There are 0 entries in directory */ - "\0\0\0\0\0\0\0\0" /* There are 0 bytes in directory */ + "\0\0\0\0\0\0\0\0" /* There are 0 entries on this disk ... */ + "\0\0\0\0\0\0\0\0" /* ... out of 0 entries total ... */ + "\0\0\0\0\0\0\0\0" /* ... requiring a total of 0 bytes. */ "\0\0\0\0\0\0\0\0" /* Directory starts at offset 0 */ "PK\006\007" /* Zip64 end-of-central-directory locator */ - "\0\0\0\0" /* Zip64 EOCD is on disk #0 .. */ + "\0\0\0\0" /* Zip64 EOCD record is on disk #0 .. */ "\0\0\0\0\0\0\0\0" /* .. at offset 0 .. */ "\1\0\0\0" /* .. of 1 total disks. */ - "PK\005\006\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + "PK\005\006" /* Regular Zip end-of-central-directory record */ + "\0\0" /* This is disk #0 */ + "\0\0" /* Central dir is on disk #0 */ + "\0\0" /* There are 0 entries on this disk ... */ + "\0\0" /* ... out of 0 total entries ... */ + "\0\0\0\0" /* ... requiring a total of 0 bytes. */ + "\0\0\0\0" /* Directory starts at offset 0. */ + "\0\0" /* File comment is zero bytes long. */, 98); /* Verify that we read this kind of empty archive correctly. */ -- 2.47.2