summaryrefslogtreecommitdiff
path: root/updater/zbin/minizip/unzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'updater/zbin/minizip/unzip.c')
-rw-r--r--updater/zbin/minizip/unzip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/updater/zbin/minizip/unzip.c b/updater/zbin/minizip/unzip.c
index 7617f41..fc956ab 100644
--- a/updater/zbin/minizip/unzip.c
+++ b/updater/zbin/minizip/unzip.c
@@ -985,7 +985,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
// Read extrafield
if ((err==UNZ_OK) && (extraField!=NULL))
{
- ZPOS64_T uSizeRead ;
+ ZPOS64_T uSizeRead, uPosRead;
if (file_info.size_file_extra<extraFieldBufferSize)
uSizeRead = file_info.size_file_extra;
else
@@ -1003,15 +1003,15 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
if (ZREAD64(s->z_filefunc, s->filestream,extraField,(uLong)uSizeRead)!=uSizeRead)
err=UNZ_ERRNO;
- lSeek += file_info.size_file_extra - (uLong)uSizeRead;
+ uPosRead = ZTELL64(s->z_filefunc, s->filestream);
+ ZSEEK64(s->z_filefunc, s->filestream,uPosRead - uSizeRead,ZLIB_FILEFUNC_SEEK_SET);
}
- else
- lSeek += file_info.size_file_extra;
+ lSeek += file_info.size_file_extra;
if ((err==UNZ_OK) && (file_info.size_file_extra != 0))
{
- uLong acc = 0;
+ uLong acc = 0;
// since lSeek now points to after the extra field we need to move back
lSeek -= file_info.size_file_extra;
@@ -1027,7 +1027,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
while(acc < file_info.size_file_extra)
{
uLong headerId;
- uLong dataSize;
+ uLong dataSize;
if (unz64local_getShort(&s->z_filefunc, s->filestream,&headerId) != UNZ_OK)
err=UNZ_ERRNO;
@@ -1761,7 +1761,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
}
- if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
+ if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
{
uInt uDoCopy,i ;