summaryrefslogtreecommitdiffstats
path: root/minzip
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-02-23 20:38:05 +0100
committerandroid-build-merger <android-build-merger@google.com>2016-02-23 20:38:05 +0100
commit90c75ddc057d4ff41541f280421b8d1c897af38a (patch)
tree2b5b76459a26f9b4e80dbb6444b686c291e3fe51 /minzip
parentFix integer overflows in recovery procedure. am: 1273956e69 am: 5978a71d29 am: 877dcba47a am: f4ee1720f3 am: cae056f219 am: 682d691052 am: ae68f02272 am: a3604da6e1 am: 089fe38ac5 (diff)
parentMerge "Surpress warnings in minzip/Zip.c" am: 4b3cdce702 (diff)
downloadandroid_bootable_recovery-90c75ddc057d4ff41541f280421b8d1c897af38a.tar
android_bootable_recovery-90c75ddc057d4ff41541f280421b8d1c897af38a.tar.gz
android_bootable_recovery-90c75ddc057d4ff41541f280421b8d1c897af38a.tar.bz2
android_bootable_recovery-90c75ddc057d4ff41541f280421b8d1c897af38a.tar.lz
android_bootable_recovery-90c75ddc057d4ff41541f280421b8d1c897af38a.tar.xz
android_bootable_recovery-90c75ddc057d4ff41541f280421b8d1c897af38a.tar.zst
android_bootable_recovery-90c75ddc057d4ff41541f280421b8d1c897af38a.zip
Diffstat (limited to 'minzip')
-rw-r--r--minzip/Zip.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/minzip/Zip.c b/minzip/Zip.c
index bdb565c64..38f939fb2 100644
--- a/minzip/Zip.c
+++ b/minzip/Zip.c
@@ -509,9 +509,6 @@ static bool processDeflatedEntry(const ZipArchive *pArchive,
unsigned char procBuf[32 * 1024];
z_stream zstream;
int zerr;
- long compRemaining;
-
- compRemaining = pEntry->compLen;
/*
* Initialize the zlib stream.
@@ -759,7 +756,7 @@ static const char *targetEntryPath(MzPathHelper *helper, ZipEntry *pEntry)
*/
needLen = helper->targetDirLen + 1 +
pEntry->fileNameLen - helper->zipDirLen + 1;
- if (needLen > helper->bufLen) {
+ if (firstTime || needLen > helper->bufLen) {
char *newBuf;
needLen *= 2;