syslog: Fix large messages (BZ#29536)
commit52a5be0df411ef3ff45c10c7c308cb92993d15b1
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Sun, 28 Aug 2022 19:52:53 +0000 (28 16:52 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 30 Aug 2022 11:54:52 +0000 (30 08:54 -0300)
treec0271ff8400922bf9f559fb10d62cd3d0fb9d62d
parentddcf5a9170a0db5055259118f3090debab248126
syslog: Fix large messages (BZ#29536)

The a583b6add407c17cd change did not handle large messages that
would require a heap allocation correctly, where the message itself
is not take in consideration.

This patch fixes it and extend the tst-syslog to check for large
messages as well.

Checked on x86_64-linux-gnu.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
misc/syslog.c
misc/tst-syslog.c