From 5a5dd2c793df39a3e1765abc3dfcad0852bdf6cb Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Mon, 16 Jan 2012 13:16:39 -0800 Subject: Fix large-entry detection in minizip on 64-bit systems [Schiffer]. --- contrib/minizip/unzip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contrib/minizip/unzip.c') 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, { uLong uL; - if(file_info.uncompressed_size == (ZPOS64_T)(unsigned long)-1) + if(file_info.uncompressed_size == MAXU32) { if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK) err=UNZ_ERRNO; } - if(file_info.compressed_size == (ZPOS64_T)(unsigned long)-1) + if(file_info.compressed_size == MAXU32) { if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK) err=UNZ_ERRNO; } - if(file_info_internal.offset_curfile == (ZPOS64_T)(unsigned long)-1) + if(file_info_internal.offset_curfile == MAXU32) { /* Relative Header offset */ if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK) err=UNZ_ERRNO; } - if(file_info.disk_num_start == (unsigned long)-1) + if(file_info.disk_num_start == MAXU32) { /* Disk Start Number */ if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK) -- cgit v1.2.3-55-g6feb