summaryrefslogtreecommitdiffstats
path: root/minzip
diff options
context:
space:
mode:
Diffstat (limited to 'minzip')
-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);