summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpooka <pooka@pkgsrc.org>2003-02-19 20:25:20 +0000
committerpooka <pooka@pkgsrc.org>2003-02-19 20:25:20 +0000
commit51d88681fdb3e104197f0bc186f62bd0599f003e (patch)
treeb6b9b9a4dcf6e15450a4fa4794a34a310ad98c9c
parent1ac6e98c01957277ac33e302399518397d21f510 (diff)
downloadpkgsrc-51d88681fdb3e104197f0bc186f62bd0599f003e.tar.gz
fix buffer overrun (games group vulnerability) when running nethack -s
patch from nethack.org
-rw-r--r--games/nethack-lib/Makefile.common4
-rw-r--r--games/nethack-lib/distinfo3
-rw-r--r--games/nethack-lib/patches/patch-ah20
-rw-r--r--games/nethack-qt/distinfo3
-rw-r--r--games/nethack-qt/patches/patch-aj20
-rw-r--r--games/nethack-tty/distinfo3
-rw-r--r--games/nethack-x11/distinfo3
-rw-r--r--games/nethack-x11/patches/patch-ai20
8 files changed, 70 insertions, 6 deletions
diff --git a/games/nethack-lib/Makefile.common b/games/nethack-lib/Makefile.common
index 0f52b68e13e..271da9d3b65 100644
--- a/games/nethack-lib/Makefile.common
+++ b/games/nethack-lib/Makefile.common
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.common,v 1.7 2002/03/25 20:32:25 pooka Exp $
+# $NetBSD: Makefile.common,v 1.8 2003/02/19 20:25:20 pooka Exp $
#
NETHACK_BASEVER= 3.4.0
-NETHACK_VERSION= ${NETHACK_BASEVER}nb1
+NETHACK_VERSION= ${NETHACK_BASEVER}nb2
NETHACK_DISTVER= 340
DISTNAME= nethack-${NETHACK_DISTVER}
diff --git a/games/nethack-lib/distinfo b/games/nethack-lib/distinfo
index 28da6647809..30b2486de31 100644
--- a/games/nethack-lib/distinfo
+++ b/games/nethack-lib/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2002/03/25 20:32:25 pooka Exp $
+$NetBSD: distinfo,v 1.5 2003/02/19 20:25:20 pooka Exp $
SHA1 (nethack-340.tgz) = db480f5bf94372a8f87ee4d081f83efd99b31523
Size (nethack-340.tgz) = 3270905 bytes
@@ -9,3 +9,4 @@ SHA1 (patch-ad) = c5e86cda66b36bfdd3d6460ec5b3c65706692dba
SHA1 (patch-ae) = b6d0cca1e3d781a2a1f1d4b244e944eaedfec716
SHA1 (patch-af) = 20c37fd62b05121d834d3c42cf3aa48b018b362d
SHA1 (patch-ag) = 6aeae6bde079b9c9081f6e32523687010c9bc674
+SHA1 (patch-ah) = 12763f8759de2c9b13d0e77f18e8e6aa69a031dc
diff --git a/games/nethack-lib/patches/patch-ah b/games/nethack-lib/patches/patch-ah
new file mode 100644
index 00000000000..529a53b51de
--- /dev/null
+++ b/games/nethack-lib/patches/patch-ah
@@ -0,0 +1,20 @@
+$NetBSD: patch-ah,v 1.1 2003/02/19 20:25:20 pooka Exp $
+
+*** src/topten.c.orig Mon Feb 4 08:06:07 2002
+--- src/topten.c Mon Feb 10 10:48:55 2003
+***************
+*** 856,861 ****
+--- 856,867 ----
+ else {
+ if (playerct > 1) Strcat(pbuf, "any of ");
+ for (i = 0; i < playerct; i++) {
++ /* stop printing players if there are too many to fit */
++ if (strlen(pbuf) + strlen(players[i]) + 2 >= BUFSZ) {
++ if (strlen(pbuf) < BUFSZ-4) Strcat(pbuf, "...");
++ else Strcpy(pbuf+strlen(pbuf)-4, "...");
++ break;
++ }
+ Strcat(pbuf, players[i]);
+ if (i < playerct-1) {
+ if (players[i][0] == '-' &&
+
diff --git a/games/nethack-qt/distinfo b/games/nethack-qt/distinfo
index b1a4a3d35c2..c2b03d28ba0 100644
--- a/games/nethack-qt/distinfo
+++ b/games/nethack-qt/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2002/09/20 21:24:48 jlam Exp $
+$NetBSD: distinfo,v 1.9 2003/02/19 20:25:21 pooka Exp $
SHA1 (nethack-340.tgz) = db480f5bf94372a8f87ee4d081f83efd99b31523
Size (nethack-340.tgz) = 3270905 bytes
@@ -10,3 +10,4 @@ SHA1 (patch-af) = 20c37fd62b05121d834d3c42cf3aa48b018b362d
SHA1 (patch-ag) = 6aeae6bde079b9c9081f6e32523687010c9bc674
SHA1 (patch-ah) = f9d4a9d7e4e536a1c221a4b12b0d204f63410543
SHA1 (patch-ai) = 580a75c7ebc55b099a702ad21ce12d960f2805ff
+SHA1 (patch-aj) = 12763f8759de2c9b13d0e77f18e8e6aa69a031dc
diff --git a/games/nethack-qt/patches/patch-aj b/games/nethack-qt/patches/patch-aj
new file mode 100644
index 00000000000..cc9584f7f5c
--- /dev/null
+++ b/games/nethack-qt/patches/patch-aj
@@ -0,0 +1,20 @@
+$NetBSD: patch-aj,v 1.1 2003/02/19 20:25:21 pooka Exp $
+
+*** src/topten.c.orig Mon Feb 4 08:06:07 2002
+--- src/topten.c Mon Feb 10 10:48:55 2003
+***************
+*** 856,861 ****
+--- 856,867 ----
+ else {
+ if (playerct > 1) Strcat(pbuf, "any of ");
+ for (i = 0; i < playerct; i++) {
++ /* stop printing players if there are too many to fit */
++ if (strlen(pbuf) + strlen(players[i]) + 2 >= BUFSZ) {
++ if (strlen(pbuf) < BUFSZ-4) Strcat(pbuf, "...");
++ else Strcpy(pbuf+strlen(pbuf)-4, "...");
++ break;
++ }
+ Strcat(pbuf, players[i]);
+ if (i < playerct-1) {
+ if (players[i][0] == '-' &&
+
diff --git a/games/nethack-tty/distinfo b/games/nethack-tty/distinfo
index e33964e61fa..7844a0149b6 100644
--- a/games/nethack-tty/distinfo
+++ b/games/nethack-tty/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2002/03/25 20:32:29 pooka Exp $
+$NetBSD: distinfo,v 1.5 2003/02/19 20:25:21 pooka Exp $
SHA1 (nethack-340.tgz) = db480f5bf94372a8f87ee4d081f83efd99b31523
Size (nethack-340.tgz) = 3270905 bytes
@@ -9,3 +9,4 @@ SHA1 (patch-ad) = c5e86cda66b36bfdd3d6460ec5b3c65706692dba
SHA1 (patch-ae) = b6d0cca1e3d781a2a1f1d4b244e944eaedfec716
SHA1 (patch-af) = 20c37fd62b05121d834d3c42cf3aa48b018b362d
SHA1 (patch-ag) = 6aeae6bde079b9c9081f6e32523687010c9bc674
+SHA1 (patch-ah) = 12763f8759de2c9b13d0e77f18e8e6aa69a031dc
diff --git a/games/nethack-x11/distinfo b/games/nethack-x11/distinfo
index 315bbc6ef82..95a4794a157 100644
--- a/games/nethack-x11/distinfo
+++ b/games/nethack-x11/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2002/09/23 10:10:51 jlam Exp $
+$NetBSD: distinfo,v 1.8 2003/02/19 20:25:21 pooka Exp $
SHA1 (nethack-340.tgz) = db480f5bf94372a8f87ee4d081f83efd99b31523
Size (nethack-340.tgz) = 3270905 bytes
@@ -9,3 +9,4 @@ SHA1 (patch-ae) = b6d0cca1e3d781a2a1f1d4b244e944eaedfec716
SHA1 (patch-af) = 20c37fd62b05121d834d3c42cf3aa48b018b362d
SHA1 (patch-ag) = 6aeae6bde079b9c9081f6e32523687010c9bc674
SHA1 (patch-ah) = 9cb29ef166fefa5672cad337e00fc960b46140eb
+SHA1 (patch-ai) = 12763f8759de2c9b13d0e77f18e8e6aa69a031dc
diff --git a/games/nethack-x11/patches/patch-ai b/games/nethack-x11/patches/patch-ai
new file mode 100644
index 00000000000..7586a2f963c
--- /dev/null
+++ b/games/nethack-x11/patches/patch-ai
@@ -0,0 +1,20 @@
+$NetBSD: patch-ai,v 1.1 2003/02/19 20:25:22 pooka Exp $
+
+*** src/topten.c.orig Mon Feb 4 08:06:07 2002
+--- src/topten.c Mon Feb 10 10:48:55 2003
+***************
+*** 856,861 ****
+--- 856,867 ----
+ else {
+ if (playerct > 1) Strcat(pbuf, "any of ");
+ for (i = 0; i < playerct; i++) {
++ /* stop printing players if there are too many to fit */
++ if (strlen(pbuf) + strlen(players[i]) + 2 >= BUFSZ) {
++ if (strlen(pbuf) < BUFSZ-4) Strcat(pbuf, "...");
++ else Strcpy(pbuf+strlen(pbuf)-4, "...");
++ break;
++ }
+ Strcat(pbuf, players[i]);
+ if (i < playerct-1) {
+ if (players[i][0] == '-' &&
+