From: Todd C. Miller Date: Fri, 13 Jan 2017 23:30:44 +0000 (-0700) Subject: Fix typo, want vsnprintf not snprintf. X-Git-Tag: SUDO_1_8_19p2^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=921ad88ab84b485ef3127e126d82545f76a02a02;p=sudo Fix typo, want vsnprintf not snprintf. --- diff --git a/lib/util/vsyslog.c b/lib/util/vsyslog.c index 44f7bcebf..b8d05b203 100644 --- a/lib/util/vsyslog.c +++ b/lib/util/vsyslog.c @@ -62,7 +62,7 @@ sudo_vsyslog(int pri, const char *fmt, va_list ap) /* Format message and log it, using a static buffer if possible. */ va_copy(ap2, ap); - len = (size_t)snprintf(msgbuf, sizeof(msgbuf), new_fmt, ap2); + len = (size_t)vsnprintf(msgbuf, sizeof(msgbuf), new_fmt, ap2); va_end(ap2); if (len < sizeof(msgbuf)) { syslog(pri, "%s", msgbuf);