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