Imported Upstream version 1.8.3p2
[debian/sudo] / src / sudo.c
index 40cfc2f4cfeb4103bdf33a74965b7326d9752529..9e52cd5130ca66bea6d874e60d27d5e9e76fa0da 100644 (file)
@@ -1208,15 +1208,15 @@ void
 sudo_debug(int level, const char *fmt, ...)
 {
     va_list ap;
-    char *fmt2;
+    char *buf;
 
     if (level > debug_level)
        return;
 
-    /* Backet fmt with program name and a newline to make it a single write */
-    easprintf(&fmt2, "%s: %s\n", getprogname(), fmt);
+    /* Bracket fmt with program name and a newline to make it a single write */
     va_start(ap, fmt);
-    vfprintf(stderr, fmt2, ap);
+    evasprintf(&buf, fmt, ap);
     va_end(ap);
-    efree(fmt2);
+    fprintf(stderr, "%s: %s\n", getprogname(), buf);
+    efree(buf);
 }