mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 09:07:02 +02:00
BUG/MINOR: log: fixing bug in tcp syslog_io_handler Octet-Counting
syslog_io_handler does specific treatment to handle syslog tcp octet counting: Logic was good, but a sneaky mistake prevented rfc-6587 octet counting from working properly. trash.area was used as an input buffer. It does not make sense here since it is uninitialized. Compilation was unaffected because trash is a thread local "global" variable. buf->area should definitely be used instead. This should be backported as far as 2.4.
This commit is contained in:
parent
bbb1c68508
commit
7faffdc6ab
@ -3626,7 +3626,7 @@ static void syslog_io_handler(struct appctx *appctx)
|
|||||||
if (buf->area[to_skip - 1] != ' ')
|
if (buf->area[to_skip - 1] != ' ')
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
|
|
||||||
msglen = strtol(trash.area, &p, 10);
|
msglen = strtol(buf->area, &p, 10);
|
||||||
if (!msglen || p != &buf->area[to_skip - 1])
|
if (!msglen || p != &buf->area[to_skip - 1])
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user