diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2012-01-16 13:16:39 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2012-01-16 16:44:40 -0800 |
commit | 5a5dd2c793df39a3e1765abc3dfcad0852bdf6cb (patch) | |
tree | 122d0a277d35aa167247650a641bc6263b75ca1f /contrib/minizip/unzip.c | |
parent | eb33abcc553dcd65ce1c4c7fc9d6bc096721d5bc (diff) | |
download | zlib-5a5dd2c793df39a3e1765abc3dfcad0852bdf6cb.tar.gz zlib-5a5dd2c793df39a3e1765abc3dfcad0852bdf6cb.tar.bz2 zlib-5a5dd2c793df39a3e1765abc3dfcad0852bdf6cb.zip |
Fix large-entry detection in minizip on 64-bit systems [Schiffer].
Diffstat (limited to '')
-rw-r--r-- | contrib/minizip/unzip.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c index 587a2a1..050014c 100644 --- a/contrib/minizip/unzip.c +++ b/contrib/minizip/unzip.c | |||
@@ -1040,26 +1040,26 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file, | |||
1040 | { | 1040 | { |
1041 | uLong uL; | 1041 | uLong uL; |
1042 | 1042 | ||
1043 | if(file_info.uncompressed_size == (ZPOS64_T)(unsigned long)-1) | 1043 | if(file_info.uncompressed_size == MAXU32) |
1044 | { | 1044 | { |
1045 | if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) | 1045 | if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) |
1046 | err=UNZ_ERRNO; | 1046 | err=UNZ_ERRNO; |
1047 | } | 1047 | } |
1048 | 1048 | ||
1049 | if(file_info.compressed_size == (ZPOS64_T)(unsigned long)-1) | 1049 | if(file_info.compressed_size == MAXU32) |
1050 | { | 1050 | { |
1051 | if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) | 1051 | if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) |
1052 | err=UNZ_ERRNO; | 1052 | err=UNZ_ERRNO; |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | if(file_info_internal.offset_curfile == (ZPOS64_T)(unsigned long)-1) | 1055 | if(file_info_internal.offset_curfile == MAXU32) |
1056 | { | 1056 | { |
1057 | /* Relative Header offset */ | 1057 | /* Relative Header offset */ |
1058 | if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) | 1058 | if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) |
1059 | err=UNZ_ERRNO; | 1059 | err=UNZ_ERRNO; |
1060 | } | 1060 | } |
1061 | 1061 | ||
1062 | if(file_info.disk_num_start == (unsigned long)-1) | 1062 | if(file_info.disk_num_start == MAXU32) |
1063 | { | 1063 | { |
1064 | /* Disk Start Number */ | 1064 | /* Disk Start Number */ |
1065 | if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) | 1065 | if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) |