summaryrefslogtreecommitdiff
path: root/games/xconq
diff options
context:
space:
mode:
authorkleink <kleink@pkgsrc.org>2003-07-30 10:52:35 +0000
committerkleink <kleink@pkgsrc.org>2003-07-30 10:52:35 +0000
commit86468f6b86a86e0d877912b17e61beb1b8a8d440 (patch)
treec40a303e26b4d931c73e9641d0bb6eafaecf38a3 /games/xconq
parent12a10361a17c7df3405ceb62b86482da9fdf6165 (diff)
downloadpkgsrc-86468f6b86a86e0d877912b17e61beb1b8a8d440.tar.gz
2003-07-26 Hans Ronne <hronne@telia.com>
Fix possible buffer overflow problem in default_player_spec on Unix (thanks Steve Kemp). * xconq.c (make_default_player_spec): Limit it to BUFSIZE -1. * xtconq.c (make_default_player_spec): Limit it to BUFSIZE -1. In due course, bump to xconq-7.4.1nb1.
Diffstat (limited to 'games/xconq')
-rw-r--r--games/xconq/Makefile3
-rw-r--r--games/xconq/distinfo3
-rw-r--r--games/xconq/patches/patch-ah25
3 files changed, 29 insertions, 2 deletions
diff --git a/games/xconq/Makefile b/games/xconq/Makefile
index 77ea9316554..d19d61ceb48 100644
--- a/games/xconq/Makefile
+++ b/games/xconq/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.16 2003/07/17 21:39:30 grant Exp $
+# $NetBSD: Makefile,v 1.17 2003/07/30 10:52:35 kleink Exp $
DISTNAME= xconq-7.4.1
CATEGORIES= games x11
MASTER_SITES= ftp://sources.redhat.com/pub/xconq/
+PKGREVISION= 1
MAINTAINER= kleink@NetBSD.org
HOMEPAGE= http://sources.redhat.com/xconq/
diff --git a/games/xconq/distinfo b/games/xconq/distinfo
index ab1d8f23117..c79a7783326 100644
--- a/games/xconq/distinfo
+++ b/games/xconq/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2002/09/23 10:28:26 jlam Exp $
+$NetBSD: distinfo,v 1.5 2003/07/30 10:52:35 kleink Exp $
SHA1 (xconq-7.4.1.tar.gz) = b7d03d17806500f05c23889a00b7608843a27ce7
Size (xconq-7.4.1.tar.gz) = 3402832 bytes
@@ -9,3 +9,4 @@ SHA1 (patch-ad) = 2e20bd999e935eaccd2c569ca6712ff28187c244
SHA1 (patch-ae) = fc440492eac9aa6feafb31dc6ba6bfceeb5408a4
SHA1 (patch-af) = 420a6702dd189058873da4a5353ebad020bec018
SHA1 (patch-ag) = 2a5989750d187d911e7bf443a1354a390dd7ab2d
+SHA1 (patch-ah) = 56ed616d61b2029bbf1dcd9a9fb1b89793761c5c
diff --git a/games/xconq/patches/patch-ah b/games/xconq/patches/patch-ah
new file mode 100644
index 00000000000..d5ac44e393e
--- /dev/null
+++ b/games/xconq/patches/patch-ah
@@ -0,0 +1,25 @@
+$NetBSD: patch-ah,v 1.3 2003/07/30 10:52:36 kleink Exp $
+
+--- x11/xconq.c.orig 2000-11-24 02:19:09.000000000 +0100
++++ x11/xconq.c 2003-07-30 12:41:28.000000000 +0200
+@@ -136,14 +136,17 @@
+ default_player_spec = xmalloc(BUFSIZE);
+ default_player_spec[0] = '\0';
+ if (!empty_string(getenv("USER"))) {
+- strcpy(default_player_spec, getenv("USER"));
++ strncpy(default_player_spec, getenv("USER"),
++ BUFSIZE - 2);
+ strcat(default_player_spec, "@");
+ }
+ if (!empty_string(raw_default_player_spec)
+ && raw_default_player_spec[0] == '@') {
+- strcat(default_player_spec, raw_default_player_spec);
++ strncat(default_player_spec, raw_default_player_spec,
++ BUFSIZE - strlen(default_player_spec) - 1);
+ } else if (!empty_string(getenv("DISPLAY"))) {
+- strcat(default_player_spec, getenv("DISPLAY"));
++ strncat(default_player_spec, getenv("DISPLAY"),
++ BUFSIZE - strlen(default_player_spec) - 1);
+ }
+ }
+