diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2009-02-10 17:22:22 +0300 |
---|---|---|
committer | Jeffrey Stedfast <fejj@novell.com> | 2009-02-10 17:22:22 +0300 |
commit | 21f14f83f45bd28c76491153b4d0e18d5eae381e (patch) | |
tree | 129032e30d44cf30aea9e3bd36560f9062e85b70 /support/minizip/unzip.c | |
parent | fbdc6bdce0dc478357d5b1e7d7719d1bffa5735c (diff) |
2009-02-10 Jeffrey Stedfast <fejj@novell.com>
* minizip/unzip.c (unzlocal_DosDateToTmuDate): Fix ambiguous
else's.
(unzlocal_DosDateToTmuDate): Here too.
(unzlocal_CheckCurrentFileCoherencyHeader): And here.
svn path=/trunk/mono/; revision=126461
Diffstat (limited to 'support/minizip/unzip.c')
-rw-r--r-- | support/minizip/unzip.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/support/minizip/unzip.c b/support/minizip/unzip.c index 9ad4766d8db..9192b3518b7 100644 --- a/support/minizip/unzip.c +++ b/support/minizip/unzip.c @@ -607,12 +607,13 @@ local int unzlocal_GetCurrentFileInfoInternal (file, /* we check the magic */ - if (err==UNZ_OK) + if (err==UNZ_OK) { if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x02014b50) err=UNZ_BADZIPFILE; - + } + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK) err=UNZ_ERRNO; @@ -687,11 +688,13 @@ local int unzlocal_GetCurrentFileInfoInternal (file, else uSizeRead = extraFieldBufferSize; - if (lSeek!=0) + if (lSeek!=0) { if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; + } + if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0)) if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; @@ -712,11 +715,13 @@ local int unzlocal_GetCurrentFileInfoInternal (file, else uSizeRead = commentBufferSize; - if (lSeek!=0) + if (lSeek!=0) { if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0) lSeek=0; else err=UNZ_ERRNO; + } + if ((file_info.size_file_comment>0) && (commentBufferSize>0)) if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead) err=UNZ_ERRNO; @@ -976,12 +981,13 @@ local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar, return UNZ_ERRNO; - if (err==UNZ_OK) + if (err==UNZ_OK) { if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK) err=UNZ_ERRNO; else if (uMagic!=0x04034b50) err=UNZ_BADZIPFILE; - + } + if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) err=UNZ_ERRNO; /* |