From: Guido Draheim Date: Thu, 15 Mar 2018 22:54:37 +0000 (+0100) Subject: fix for zz_rootsize #41 X-Git-Tag: v0.13.69~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=feae4da1a5c92100c44ebfcbaaa895959cc0829b;p=zziplib fix for zz_rootsize #41 --- diff --git a/zzip/zip.c b/zzip/zip.c index 0d79d52..14e2e06 100644 --- a/zzip/zip.c +++ b/zzip/zip.c @@ -421,7 +421,7 @@ __zzip_parse_root_directory(int fd, zzip_off64_t zz_rootseek = _disk_trailer_rootseek(trailer); __correct_rootseek(zz_rootseek, zz_rootsize, trailer); - if (zz_entries < 0 || zz_rootseek < 0 || zz_rootseek < 0) + if (zz_entries < 0 || zz_rootseek < 0 || zz_rootsize < 0) return ZZIP_CORRUPTED; hdr0 = (struct zzip_dir_hdr *) malloc(zz_rootsize);