a995b3
From feae4da1a5c92100c44ebfcbaaa895959cc0829b Mon Sep 17 00:00:00 2001
a995b3
From: Guido Draheim <guidod@gmx.de>
a995b3
Date: Thu, 15 Mar 2018 23:54:37 +0100
a995b3
Subject: [PATCH] fix for zz_rootsize #41
a995b3
a995b3
---
a995b3
 zzip/zip.c | 2 +-
a995b3
 1 file changed, 1 insertion(+), 1 deletion(-)
a995b3
a995b3
diff --git a/zzip/zip.c b/zzip/zip.c
a995b3
index 0d79d52..14e2e06 100644
a995b3
--- a/zzip/zip.c
a995b3
+++ b/zzip/zip.c
a995b3
@@ -421,7 +421,7 @@ __zzip_parse_root_directory(int fd,
a995b3
     zzip_off64_t zz_rootseek = _disk_trailer_rootseek(trailer);
a995b3
     __correct_rootseek(zz_rootseek, zz_rootsize, trailer);
a995b3
 
a995b3
-    if (zz_entries < 0 || zz_rootseek < 0 || zz_rootseek < 0)
a995b3
+    if (zz_entries < 0 || zz_rootseek < 0 || zz_rootsize < 0)
a995b3
         return ZZIP_CORRUPTED;
a995b3
 
a995b3
     hdr0 = (struct zzip_dir_hdr *) malloc(zz_rootsize);