journald: when processing a native message, bail more quickly on overbig messages
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 5 Dec 2018 21:50:39 +0000 (22:50 +0100)
committerMartin Pitt <mpitt@debian.org>
Mon, 18 Feb 2019 13:54:04 +0000 (13:54 +0000)
commit3c82ec610bff5cb7be304740632e8885ab401233
tree43c5d0be768cffc15603826867e531cf37cd671d
parent19660058973f4bd1b60249f4ad2fb5b3bb0ff22e
journald: when processing a native message, bail more quickly on overbig messages

We'd first parse all or most of the message, and only then consider if it
is not too large. Also, when encountering a single field over the limit,
we'd still process the preceding part of the message. Let's be stricter,
and check size limits early, and let's refuse the whole message if it fails
any of the size limits.

(cherry picked from commit 964ef920ea6735d39f856b05fd8ef451a09a6a1d)
(cherry picked from commit c13facb835046af8ab8ebad2ec63d9e8c0909f26)

Gbp-Pq: Name journald-when-processing-a-native-message-bail-more-quick.patch
src/journal/journald-native.c