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)
committerMichael Biebl <biebl@debian.org>
Sat, 12 Jan 2019 20:49:44 +0000 (20:49 +0000)
commit9b4b4f9f6dc765186c24c32e854a4844494cf65a
tree6153ceee57e48f03ee439041994e7c9b1a6dcf3f
parent6bc05c7604733d6a5fda484eb3268a72755d9cdb
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