File 0006-alsactl-Fix-the-va_list-initialization-in-cerror_-an.patch of Package alsa-utils.2993
From f4be3f88b6e80e3f3ea19ba5784cff49ab6e6277 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Sun, 29 Dec 2013 20:03:21 +0100
Subject: [PATCH] alsactl: Fix the va_list initialization in cerror_() and
dbg_()
The <ap> argument for syslog_() was uninitialized.
From: Alan Hamilton <alanh@arizonaroads.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
alsactl/utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/alsactl/utils.c
+++ b/alsactl/utils.c
@@ -150,10 +150,10 @@ void cerror_(const char *fcn, long line,
if (!cond && !debugflag)
return;
+ va_start(ap, fmt);
if (use_syslog) {
syslog_(LOG_ERR, fcn, line, fmt, ap);
} else {
- va_start(ap, fmt);
fprintf(stderr, "%s: %s:%ld: ", command, fcn, line);
vfprintf(stderr, fmt, ap);
putc('\n', stderr);
@@ -167,10 +167,10 @@ void dbg_(const char *fcn, long line, co
if (!debugflag)
return;
+ va_start(ap, fmt);
if (use_syslog) {
syslog_(LOG_DEBUG, fcn, line, fmt, ap);
} else {
- va_start(ap, fmt);
fprintf(stderr, "%s: %s:%ld: ", command, fcn, line);
vfprintf(stderr, fmt, ap);
putc('\n', stderr);