diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-08-22 00:11:13 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-09-03 20:25:36 +0200 |
commit | 4902e7a9e83d48398cd84b28e00daa837555b83e (patch) | |
tree | a7f9f8f9c5eb5b6c1e2b81aca3c57cef81b9dfe0 /pulse | |
parent | e3c2aaa6fa61423805d0659d9625bb52337cd6ba (diff) |
Add trailing NUL character to snprintf output
snprintf doesn't necessarily append a trailing NUL to the strings it writes. So
let's do it explicitly.
Diffstat (limited to 'pulse')
-rw-r--r-- | pulse/pulse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pulse/pulse.c b/pulse/pulse.c index 8a60507..8e47b6c 100644 --- a/pulse/pulse.c +++ b/pulse/pulse.c @@ -162,6 +162,7 @@ snd_pulse_t *pulse_new(void) pa_path_get_filename(proc)); else snprintf(buf, sizeof(buf), "ALSA plug-in"); + buf[sizeof(buf)-1] = 0; p->context = pa_context_new(pa_threaded_mainloop_get_api(p->mainloop), buf); |