BUG/MINOR: log: fix parse_log_message rfc5424 size check

In parse_log_message(), if log is rfc5424 compliant, p pointer
is incremented and size is not. However size is still used in further
checks as if p pointer was not incremented.

This could lead to logic error or buffer overflow if input buf is not
null-terminated.

Fixing this by making sure size is up to date where it is needed.

It could be backported up to 2.4.

(cherry picked from commit ab9efc25f07b9870c827e2da05fe23a084a8b8f4)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 0a069e2482a1c5558c6b93de7078e1217a94a63f)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 71a6515c2867a884e34d6f8f2e809d773644dd0e)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed