From a957a657b08346ba032bfee0f8a41da3715cbb6d Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 13 Jan 2017 16:39:31 -0700 Subject: [PATCH] Double the size of new_fmt[] and remove an extraneous break in the %m handling that was leftover from an earlier edit. --- lib/util/vsyslog.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/util/vsyslog.c b/lib/util/vsyslog.c index b8d05b203..a973e49d0 100644 --- a/lib/util/vsyslog.c +++ b/lib/util/vsyslog.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Todd C. Miller + * Copyright (c) 2016-2017 Todd C. Miller * * 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++; -- 2.40.0