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>
Sun, 27 Jan 2019 21:33:07 +0000 (21:33 +0000)
commit0e1234f85b8782590859f3e1c55c18ea7d08176f
tree8d4d5e8d0acd231579389e0d2306598f6f4394ec
parent8c8faecf7522fcfc1d6516d32a344f1289c71f00
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