1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-ag,v 1.6 2004/02/20 00:41:16 abs Exp $
--- mserv/opt.c.orig Sun Aug 3 15:57:20 2003
+++ mserv/opt.c
@@ -115,7 +115,7 @@ int opt_read(const char *root)
sprintf(m, "%s/%s", root, val);
} else {
/* value is absolute path */
- if ((m = malloc(strlen(val))) == NULL) {
+ if ((m = malloc(strlen(val)+1)) == NULL) {
fprintf(stderr, "%s: out of memory building path\n", progname);
return -1;
}
@@ -164,8 +164,8 @@ int opt_read(const char *root)
/* special case - player variable is an indirected to another variable */
if ((val = conf_getvalue("player")) == NULL) {
if (mserv_verbose)
- printf("No player specified, defaulting to /usr/local/bin/mpg123\n");
- opt_player = "/usr/local/bin/mpg123";
+ printf("No player specified, defaulting to " PATH_MPG123 "\n");
+ opt_player = PATH_MPG123;
} else {
if ((opt_player = conf_getvalue(val)) == NULL) {
fprintf(stderr, "%s: player setting '%s' not found\n", progname,
|