+2010-04-05 guidod <guidod@gmx.de>
+
+ * zzip/zip.c (__zzip_parse_root_directory): move the check for
+ zzip_disk_entry_check_magic to be after the the check that
+ the seek-value is more than a header's size before the end.
+ (based on a segfault report by Tulipánt Gergely when the
+ new modulo_entries code is enabled (which is off by default))
+
2010-03-30 guidod <guidod@gmx.de>
* zzip/Makefile.am: fixing symlinks for lib* - use only for Linux
d = &dirent;
}
+ if ((zzip_off64_t) (zz_offset + sizeof(*d)) > zz_rootsize ||
+ (zzip_off64_t) (zz_offset + sizeof(*d)) < 0)
+ {
+ FAIL4("%li's entry stretches beyond root directory (O:%li R:%li)",
+ (long) entries, (long) (zz_offset), (long) zz_rootsize);
+ break;
+ }
+
if (! zzip_disk_entry_check_magic(d)) {
# ifndef ZZIP_ALLOW_MODULO_ENTRIES
FAIL4("%li's entry has no disk_entry magic indicator (O:%li R:%li)",
break;
}
- if ((zzip_off64_t) (zz_offset + sizeof(*d)) > zz_rootsize ||
- (zzip_off64_t) (zz_offset + sizeof(*d)) < 0)
- {
- FAIL4("%li's entry stretches beyond root directory (O:%li R:%li)",
- (long) entries, (long) (zz_offset), (long) zz_rootsize);
- break;
- }
# if 0 && defined DEBUG
zzip_debug_xbuf((unsigned char *) d, sizeof(*d) + 8);
# endif