summaryrefslogtreecommitdiffstats
path: root/minzip
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-02-23 20:16:42 +0100
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-02-23 20:16:42 +0100
commit4b3cdce702fefa7eac0626f57d09ff018127c191 (patch)
tree9cb419fdbc512329a7ad6e66c7bd08d84f40ff5b /minzip
parentMerge "Control fault injection with config files instead of build flags" (diff)
parentSurpress warnings in minzip/Zip.c (diff)
downloadandroid_bootable_recovery-4b3cdce702fefa7eac0626f57d09ff018127c191.tar
android_bootable_recovery-4b3cdce702fefa7eac0626f57d09ff018127c191.tar.gz
android_bootable_recovery-4b3cdce702fefa7eac0626f57d09ff018127c191.tar.bz2
android_bootable_recovery-4b3cdce702fefa7eac0626f57d09ff018127c191.tar.lz
android_bootable_recovery-4b3cdce702fefa7eac0626f57d09ff018127c191.tar.xz
android_bootable_recovery-4b3cdce702fefa7eac0626f57d09ff018127c191.tar.zst
android_bootable_recovery-4b3cdce702fefa7eac0626f57d09ff018127c191.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;