blob: d5ac44e393e29778ef0ca7a5e395cb2b01e460a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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);
}
}
|