From 49fd8ee72e76cd27a978a843ecc58ad10fe077bc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 1 Aug 2009 02:03:22 +0200 Subject: core-util: replace remaining fixed size destination string functions by _malloc() versions This helps portability to GNU/Hurd. Patch originally from Samuel Thibault but modified. Closes ticket #546 --- src/utils/padsp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/utils') diff --git a/src/utils/padsp.c b/src/utils/padsp.c index dfa5aac2..882522c4 100644 --- a/src/utils/padsp.c +++ b/src/utils/padsp.c @@ -53,6 +53,7 @@ #include #include #include +#include /* On some systems SIOCINQ isn't defined, but FIONREAD is just an alias */ #if !defined(SIOCINQ) && defined(FIONREAD) @@ -459,15 +460,16 @@ static void reset_params(fd_info *i) { } static const char *client_name(char *buf, size_t n) { - char p[PATH_MAX]; + char *p; const char *e; if ((e = getenv("PADSP_CLIENT_NAME"))) return e; - if (pa_get_binary_name(p, sizeof(p))) + if ((p = pa_get_binary_name_malloc())) { snprintf(buf, n, "OSS Emulation[%s]", p); - else + pa_xfree(p); + } else snprintf(buf, n, "OSS"); return buf; -- cgit