X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fsudo.c;h=9e52cd5130ca66bea6d874e60d27d5e9e76fa0da;hb=0b21e55969badb5a284e97d31432c3f9139bed27;hp=40cfc2f4cfeb4103bdf33a74965b7326d9752529;hpb=3a9f5f17329715f3bc44f8680c997f0f551ff59f;p=debian%2Fsudo diff --git a/src/sudo.c b/src/sudo.c index 40cfc2f..9e52cd5 100644 --- a/src/sudo.c +++ b/src/sudo.c @@ -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); }