Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions contrib/minizip/unzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@

#define SIZECENTRALDIRITEM (0x2e)
#define SIZEZIPLOCALHEADER (0x1e)
#define SIZEEOCD (0x16)
#define SIZEZIP64EOCDLOCATOR (0x14)


const char unz_copyright[] =
Expand Down Expand Up @@ -326,7 +328,7 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
unsigned char* buf;
ZPOS64_T uSizeFile;
ZPOS64_T uBackRead;
ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
ZPOS64_T uMaxBack= SIZEEOCD + 0xffff; /* EOCD record + maximum size of global comment */
ZPOS64_T uPosFound=CENTRALDIRINVALID;

if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
Expand Down Expand Up @@ -387,7 +389,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
unsigned char* buf;
ZPOS64_T uSizeFile;
ZPOS64_T uBackRead;
ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
ZPOS64_T uMaxBack= SIZEZIP64EOCDLOCATOR + SIZEEOCD + 0xffff; /* EOCD locator/record + maximum size of global comment */
ZPOS64_T uPosFound=CENTRALDIRINVALID;
uLong uL;
ZPOS64_T relativeOffset;
Expand Down