]> granicus.if.org Git - sudo/commitdiff
Fix typo, want vsnprintf not snprintf.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 13 Jan 2017 23:30:44 +0000 (16:30 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 13 Jan 2017 23:30:44 +0000 (16:30 -0700)
lib/util/vsyslog.c

index 44f7bcebf45899af93eb0a41c405eef170256a8a..b8d05b203fafea6ecae4957b16bc3b66e9d6c695 100644 (file)
@@ -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);