diff options
Diffstat (limited to 'archivers/zoo/patches/patch-ai')
-rw-r--r-- | archivers/zoo/patches/patch-ai | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/archivers/zoo/patches/patch-ai b/archivers/zoo/patches/patch-ai index 9867a5f35d4..25ecdd8fbb3 100644 --- a/archivers/zoo/patches/patch-ai +++ b/archivers/zoo/patches/patch-ai @@ -1,8 +1,38 @@ -$NetBSD: patch-ai,v 1.2 2005/05/21 11:35:01 rillig Exp $ +$NetBSD: patch-ai,v 1.3 2007/05/13 16:59:39 taca Exp $ ---- ./zoolist.c Sat Jul 20 00:57:27 1991 -+++ /usr/pkgsrc/archivers/zoo/work.i386.unpatched/zoolist.c Fri Nov 12 06:19:38 1999 -@@ -539,10 +539,12 @@ +--- zoolist.c.orig 1991-07-20 07:57:27.000000000 +0900 ++++ zoolist.c +@@ -92,6 +92,7 @@ int genson = 1; /* enable/disable ge + int show_mode = 0; /* show file protection */ + #endif + int first_dir = 1; /* if first direntry -- to adjust dat_ofs */ ++unsigned long zoo_pointer = 0; /* Track our position in the file */ + + while (*option) { + switch (*option) { +@@ -211,6 +212,9 @@ if (fiz_ofs != 0L) { /* i + show_acmt (&zoo_header, zoo_file, 0); /* show archive comment */ + } + ++ /* Begin tracking our position in the file */ ++ zoo_pointer = zoo_header.zoo_start; ++ + /* Seek to the beginning of the first directory entry */ + if (zooseek (zoo_file, zoo_header.zoo_start, 0) != 0) { + ercount++; +@@ -437,6 +441,11 @@ if (fiz_ofs != 0L) { /* i + if (verb_list && !fast) + show_comment (&direntry, zoo_file, 0, (char *) NULL); + } /* end if (lots of conditions) */ ++ ++ /* Make sure we are not seeking to already processed data */ ++ if (direntry.next <= zoo_pointer) ++ prterror ('f', "ZOO chain structure is corrupted\n"); ++ zoo_pointer = direntry.next; + + /* ..seek to next dir entry */ + zooseek (zoo_file, direntry.next, 0); +@@ -539,10 +548,12 @@ int file_tz; { long gettz(); int diff_tz; /* timezone difference */ |