]> granicus.if.org Git - sudo/commitdiff
Double the size of new_fmt[] and remove an extraneous break in the
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 13 Jan 2017 23:39:31 +0000 (16:39 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 13 Jan 2017 23:39:31 +0000 (16:39 -0700)
%m handling that was leftover from an earlier edit.

lib/util/vsyslog.c

index b8d05b203fafea6ecae4957b16bc3b66e9d6c695..a973e49d0fbf805c22f011f8095f58c62c70e537 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2016-2017 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -35,7 +35,7 @@ void
 sudo_vsyslog(int pri, const char *fmt, va_list ap)
 {
     int saved_errno = errno;
-    char *cp, *ep, msgbuf[8192], new_fmt[1024];
+    char *cp, *ep, msgbuf[8192], new_fmt[2048];
     va_list ap2;
     size_t len;
 
@@ -47,7 +47,6 @@ sudo_vsyslog(int pri, const char *fmt, va_list ap)
            if (len >= (size_t)(ep - cp))
                len = (size_t)(ep - cp) - 1;
            cp += len;
-           break;
        } else {
            if (fmt[0] == '%' && fmt[1] == '%') {
                    fmt++;