summaryrefslogtreecommitdiffstats
path: root/minzip/Zip.c
diff options
context:
space:
mode:
authorMichael Runge <mrunge@google.com>2014-05-07 01:54:42 +0200
committerMichael Runge <mrunge@google.com>2014-05-09 20:09:28 +0200
commitf5d9f891524862ba560650bd545668dc22622cdb (patch)
treecdb803102468ee0fb4e40317fc672543fd2bae05 /minzip/Zip.c
parentam e9f9238a: am 1cd52423: am 1c2cf1db: Merge "recovery: minui: add adf backend" (diff)
downloadandroid_bootable_recovery-f5d9f891524862ba560650bd545668dc22622cdb.tar
android_bootable_recovery-f5d9f891524862ba560650bd545668dc22622cdb.tar.gz
android_bootable_recovery-f5d9f891524862ba560650bd545668dc22622cdb.tar.bz2
android_bootable_recovery-f5d9f891524862ba560650bd545668dc22622cdb.tar.lz
android_bootable_recovery-f5d9f891524862ba560650bd545668dc22622cdb.tar.xz
android_bootable_recovery-f5d9f891524862ba560650bd545668dc22622cdb.tar.zst
android_bootable_recovery-f5d9f891524862ba560650bd545668dc22622cdb.zip
Diffstat (limited to '')
-rw-r--r--minzip/Zip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/minzip/Zip.c b/minzip/Zip.c
index abc98901c..5070104d3 100644
--- a/minzip/Zip.c
+++ b/minzip/Zip.c
@@ -698,7 +698,9 @@ static bool writeProcessFunction(const unsigned char *data, int dataLen,
void *cookie)
{
int fd = (int)(intptr_t)cookie;
-
+ if (dataLen == 0) {
+ return true;
+ }
ssize_t soFar = 0;
while (true) {
ssize_t n = write(fd, data+soFar, dataLen-soFar);