Fix reading disk number start on zip64 files in minizip.

This commit is contained in:
Mark Adler 2023-07-29 23:34:26 -07:00
parent 7b28ecc89d
commit e0bd0ad6e4
1 changed files with 2 additions and 4 deletions

View File

@ -988,8 +988,6 @@ local int unz64local_GetCurrentFileInfoInternal(unzFile file,
/* ZIP64 extra fields */
if (headerId == 0x0001)
{
uLong uL;
if(file_info.uncompressed_size == MAXU32)
{
if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
@ -1009,10 +1007,10 @@ local int unz64local_GetCurrentFileInfoInternal(unzFile file,
err=UNZ_ERRNO;
}
if(file_info.disk_num_start == MAXU32)
if(file_info.disk_num_start == 0xffff)
{
/* Disk Start Number */
if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
err=UNZ_ERRNO;
}