summaryrefslogtreecommitdiff
path: root/games/nethack-lib
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 /games/nethack-lib
parent1ac6e98c01957277ac33e302399518397d21f510 (diff)
downloadpkgsrc-51d88681fdb3e104197f0bc186f62bd0599f003e.tar.gz
fix buffer overrun (games group vulnerability) when running nethack -s
patch from nethack.org
Diffstat (limited to 'games/nethack-lib')
-rw-r--r--games/nethack-lib/Makefile.common4
-rw-r--r--games/nethack-lib/distinfo3
-rw-r--r--games/nethack-lib/patches/patch-ah20
3 files changed, 24 insertions, 3 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] == '-' &&
+