From: Dragan Dosen Date: Tue, 30 Jun 2020 19:16:43 +0000 (+0200) Subject: BUG/MEDIUM: log-format: fix possible endless loop in parse_logformat_string() X-Git-Tag: v2.2-dev12~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2866acfb2361dc4416faeaaf45401e083651d6a2;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: log-format: fix possible endless loop in parse_logformat_string() This patch adds a missing break to end the loop in case when '%[' is not properly closed with ']'. The issue has been introduced with commit cd0d2ed ("MEDIUM: log-format: make the LF parser aware of sample expressions' end"). --- diff --git a/src/log.c b/src/log.c index 385bfc71ec..f2480b4367 100644 --- a/src/log.c +++ b/src/log.c @@ -683,6 +683,7 @@ int parse_logformat_string(const char *fmt, struct proxy *curproxy, struct list memprintf(err, "expected ']' after '%s', but found '%c'", var, c); else memprintf(err, "missing ']' after '%s'", var); + goto fail; } break;