summaryrefslogtreecommitdiff
path: root/archivers/arc
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-08-11 18:19:11 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-08-11 18:19:11 +0000
commit73f81b8c4233337f905c12df8a09e2f4abbde298 (patch)
tree68556ef4f170d592e739d69c04b872e8d20d64ea /archivers/arc
parentNew port: net/ehnt - A simple Cisco NetFlow data collector (diff)
Protect against bad entry size in header
Notes
Notes: svn path=/head/; revision=46082
Diffstat (limited to 'archivers/arc')
-rw-r--r--archivers/arc/Makefile1
-rw-r--r--archivers/arc/files/patch-aj14
2 files changed, 13 insertions, 2 deletions
diff --git a/archivers/arc/Makefile b/archivers/arc/Makefile
index fe52f1fef2b8..704e339ddbfb 100644
--- a/archivers/arc/Makefile
+++ b/archivers/arc/Makefile
@@ -7,6 +7,7 @@
PORTNAME= arc
PORTVERSION= 5.21e.8
+PORTREVISION= 1
CATEGORIES= archivers
MASTER_SITES= ftp://ftp.kiarchive.ru/pub/unix/arcers/
DISTNAME= arc521e.pl8
diff --git a/archivers/arc/files/patch-aj b/archivers/arc/files/patch-aj
index f7dc13a56ce6..7034aeaf6cb0 100644
--- a/archivers/arc/files/patch-aj
+++ b/archivers/arc/files/patch-aj
@@ -1,5 +1,5 @@
---- ./arcio.c.orig Tue Aug 10 23:03:25 1999
-+++ ./arcio.c Tue Aug 10 23:01:56 1999
+--- arcio.c.orig Wed Apr 15 02:58:26 1992
++++ arcio.c Sat Aug 11 22:10:55 2001
@@ -46,7 +46,7 @@
return 0; /* then signal end of archive */
@@ -22,3 +22,13 @@
printf(" %d bytes skipped.\n", try);
if (feof(f))
+@@ -110,7 +110,8 @@
+ hdr->crc = (short) ((dummy[22] << 8) + dummy[21]);
+ for (i = 0, hdr->length=0; i<4; hdr->length<<=8, hdr->length += dummy[26-i], i++);
+ #endif
+-
++ if (hdr->size < 0)
++ arcdie("Invalid header in archive %s", arcname);
+ if (hdr->date > olddate
+ || (hdr->date == olddate && hdr->time > oldtime)) {
+ olddate = hdr->date;