ngompa / rpms / sudo

Forked from rpms/sudo 2 years ago
Clone
2c51203
--- sudo-1.8.3p1/src/sudo.c	Fri Oct 21 09:01:26 2011
2c51203
+++ sudo-1.8.3p1/src/sudo.c	Tue Jan 24 15:59:03 2012
2c51203
@@ -1208,15 +1208,15 @@ 
2c51203
 sudo_debug(int level, const char *fmt, ...)
2c51203
 {
2c51203
     va_list ap;
2c51203
-    char *fmt2;
2c51203
+    char *buf;
2c51203
 
2c51203
     if (level > debug_level)
2c51203
 	return;
2c51203
 
2c51203
-    /* Backet fmt with program name and a newline to make it a single write */
2c51203
-    easprintf(&fmt2, "%s: %s\n", getprogname(), fmt);
2c51203
+    /* Bracket fmt with program name and a newline to make it a single write */
2c51203
     va_start(ap, fmt);
2c51203
-    vfprintf(stderr, fmt2, ap);
2c51203
+    evasprintf(&buf, fmt, ap);
2c51203
     va_end(ap);
2c51203
-    efree(fmt2);
2c51203
+    fprintf(stderr, "%s: %s\n", getprogname(), buf);
2c51203
+    efree(buf);
2c51203
 }