diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2023-07-29 23:34:26 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2023-07-29 23:34:26 -0700 |
commit | e0bd0ad6e4d8afd2bc3d55d84d459a0e2c0e2890 (patch) | |
tree | 62c25faec9ede38a75b2a1d26d612dbeca92da9a | |
parent | 7b28ecc89d7c29f3e72f0b5dc6303d6f65a35979 (diff) | |
download | zlib-e0bd0ad6e4d8afd2bc3d55d84d459a0e2c0e2890.tar.gz zlib-e0bd0ad6e4d8afd2bc3d55d84d459a0e2c0e2890.tar.bz2 zlib-e0bd0ad6e4d8afd2bc3d55d84d459a0e2c0e2890.zip |
Fix reading disk number start on zip64 files in minizip.
-rw-r--r-- | contrib/minizip/unzip.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c index 3adc692..8d010c5 100644 --- a/contrib/minizip/unzip.c +++ b/contrib/minizip/unzip.c | |||
@@ -988,8 +988,6 @@ local int unz64local_GetCurrentFileInfoInternal(unzFile file, | |||
988 | /* ZIP64 extra fields */ | 988 | /* ZIP64 extra fields */ |
989 | if (headerId == 0x0001) | 989 | if (headerId == 0x0001) |
990 | { | 990 | { |
991 | uLong uL; | ||
992 | |||
993 | if(file_info.uncompressed_size == MAXU32) | 991 | if(file_info.uncompressed_size == MAXU32) |
994 | { | 992 | { |
995 | if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) | 993 | if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) |
@@ -1009,10 +1007,10 @@ local int unz64local_GetCurrentFileInfoInternal(unzFile file, | |||
1009 | err=UNZ_ERRNO; | 1007 | err=UNZ_ERRNO; |
1010 | } | 1008 | } |
1011 | 1009 | ||
1012 | if(file_info.disk_num_start == MAXU32) | 1010 | if(file_info.disk_num_start == 0xffff) |
1013 | { | 1011 | { |
1014 | /* Disk Start Number */ | 1012 | /* Disk Start Number */ |
1015 | if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) | 1013 | if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK) |
1016 | err=UNZ_ERRNO; | 1014 | err=UNZ_ERRNO; |
1017 | } | 1015 | } |
1018 | 1016 | ||