freebsd-ports/archivers/zoo/files/patch-zooext.c
Jean-Marc Zucconi 873d90098c Fix a bug that causes it to loop on some ill-formed archives.
Submitted by:	Derek M Jones <derek@knosof.co.uk>
2005-11-12 13:09:06 +00:00

12 lines
382 B
C

--- zooext.c~ Sat May 1 05:58:50 1993
+++ zooext.c Sat Nov 12 14:04:17 2005
@@ -184,7 +184,8 @@
this_file = STDOUT; /* standard output */
while (1) {
- frd_dir (&direntry, zoo_file);
+ if (frd_dir (&direntry, zoo_file) < 0)
+ prterror('f', bad_directory);
if (direntry.zoo_tag != ZOO_TAG) {
long currpos, zoolength;
prterror ('F', invalid_header);