]> granicus.if.org Git - zziplib/commitdiff
#68 ssize_t return value of zzip_file_read is a signed value being possibly -1
authorGuido Draheim <guidod@gmx.de>
Mon, 4 Jan 2021 20:48:45 +0000 (21:48 +0100)
committerGuido Draheim <guidod@gmx.de>
Mon, 4 Jan 2021 20:48:45 +0000 (21:48 +0100)
bins/unzzipcat-zip.c

index dd78c2be641b1d7f5efe35ebfdca312576c1f2c7..385aeaf9177d1c000eeb7e040b6643fb761b5f19 100644 (file)
@@ -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);
        }