summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/core-scache.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-01 02:03:22 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-01 02:03:22 +0200
commit49fd8ee72e76cd27a978a843ecc58ad10fe077bc (patch)
tree56568293bea1b42faa267a96836e01ad418cbd18 /src/pulsecore/core-scache.c
parentc6ea9fecc9acd70642ae45b01300484f6b900c6b (diff)
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
Diffstat (limited to 'src/pulsecore/core-scache.c')
-rw-r--r--src/pulsecore/core-scache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c
index 4c5a4b26..fde12ecf 100644
--- a/src/pulsecore/core-scache.c
+++ b/src/pulsecore/core-scache.c
@@ -494,13 +494,14 @@ int pa_scache_add_directory_lazy(pa_core *c, const char *pathname) {
struct dirent *e;
while ((e = readdir(dir))) {
- char p[PATH_MAX];
+ char *p;
if (e->d_name[0] == '.')
continue;
- pa_snprintf(p, sizeof(p), "%s/%s", pathname, e->d_name);
+ p = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", pathname, e->d_name);
add_file(c, p);
+ pa_xfree(p);
}
closedir(dir);