summaryrefslogtreecommitdiff
path: root/games/xconq/patches/patch-ah
diff options
context:
space:
mode:
Diffstat (limited to 'games/xconq/patches/patch-ah')
-rw-r--r--games/xconq/patches/patch-ah25
1 files changed, 25 insertions, 0 deletions
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);
+ }
+ }
+