From ac9ae39ef419e9f0f83da1e583314d8c7cda34a6 Mon Sep 17 00:00:00 2001
From: Guido Draheim <guidod@gmx.de>
Date: Mon, 4 Jan 2021 21:48:45 +0100
Subject: [PATCH 01/35] #68 ssize_t return value of zzip_file_read is a signed
 value being possibly -1

---
 bins/unzzipcat-zip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bins/unzzipcat-zip.c b/bins/unzzipcat-zip.c
index dd78c2b..385aeaf 100644
--- a/bins/unzzipcat-zip.c
+++ b/bins/unzzipcat-zip.c
@@ -34,7 +34,7 @@ static void unzzip_cat_file(ZZIP_DIR* disk, char* name, FILE* out)
     if (file) 
     {
 	char buffer[1024]; int len;
-	while ((len = zzip_file_read (file, buffer, 1024))) 
+	while (0 < (len = zzip_file_read (file, buffer, 1024))) 
 	{
 	    fwrite (buffer, 1, len, out);
 	}
-- 
1.8.3.1

