diff options
| author | Narendra Umate <[email protected]> | 2013-09-07 15:43:32 -0700 |
|---|---|---|
| committer | Narendra Umate <[email protected]> | 2013-09-07 15:43:32 -0700 |
| commit | c3ca7291626b60a32008774dd290671708babc20 (patch) | |
| tree | c87d1097bb8b59b6724ca19560f7c92b0309caf3 /mp/src/public/XUnzip.cpp | |
| parent | Update .gitignore. (diff) | |
| parent | Added missing libs for linux and OSX in their new location. (diff) | |
| download | source-sdk-2013-c3ca7291626b60a32008774dd290671708babc20.tar.xz source-sdk-2013-c3ca7291626b60a32008774dd290671708babc20.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mp/src/public/XUnzip.cpp')
| -rw-r--r-- | mp/src/public/XUnzip.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mp/src/public/XUnzip.cpp b/mp/src/public/XUnzip.cpp index 22c7d62c..72fc7805 100644 --- a/mp/src/public/XUnzip.cpp +++ b/mp/src/public/XUnzip.cpp @@ -3232,10 +3232,12 @@ int unzlocal_GetCurrentFileInfoInternal (unzFile file, unz_file_info *pfile_info // we check the magic
if (err==UNZ_OK)
+ {
if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
err=UNZ_ERRNO;
else if (uMagic!=0x02014b50)
err=UNZ_BADZIPFILE;
+ }
if (unzlocal_getShort(s->file,&file_info.version) != UNZ_OK)
err=UNZ_ERRNO;
@@ -3312,10 +3314,12 @@ int unzlocal_GetCurrentFileInfoInternal (unzFile file, unz_file_info *pfile_info uSizeRead = extraFieldBufferSize;
if (lSeek!=0)
+ {
if (lufseek(s->file,lSeek,SEEK_CUR)==0)
lSeek=0;
else
err=UNZ_ERRNO;
+ }
if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
if (lufread(extraField,(uInt)uSizeRead,1,s->file)!=1)
err=UNZ_ERRNO;
@@ -3337,10 +3341,12 @@ int unzlocal_GetCurrentFileInfoInternal (unzFile file, unz_file_info *pfile_info uSizeRead = commentBufferSize;
if (lSeek!=0)
+ {
if (lufseek(s->file,lSeek,SEEK_CUR)==0)
{} // unused lSeek=0;
else
err=UNZ_ERRNO;
+ }
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
if (lufread(szComment,(uInt)uSizeRead,1,s->file)!=1)
err=UNZ_ERRNO;
@@ -3490,10 +3496,12 @@ int unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s,uInt *piSizeVar, if (err==UNZ_OK)
+ {
if (unzlocal_getLong(s->file,&uMagic) != UNZ_OK)
err=UNZ_ERRNO;
else if (uMagic!=0x04034b50)
err=UNZ_BADZIPFILE;
+ }
if (unzlocal_getShort(s->file,&uData) != UNZ_OK)
err=UNZ_ERRNO;
|