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").
This commit is contained in:
Dragan Dosen 2020-06-30 21:16:43 +02:00 committed by Willy Tarreau
parent b4cf7ab9bc
commit 2866acfb23

View File

@ -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); memprintf(err, "expected ']' after '%s', but found '%c'", var, c);
else else
memprintf(err, "missing ']' after '%s'", var); memprintf(err, "missing ']' after '%s'", var);
goto fail;
} }
break; break;