From 4902e7a9e83d48398cd84b28e00daa837555b83e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 22 Aug 2008 00:11:13 +0200 Subject: 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. --- pulse/pulse.c | 1 + 1 file changed, 1 insertion(+) (limited to 'pulse') 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); -- cgit