journal: fix buffer overrun when urlifying
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 23 Jun 2020 18:51:13 +0000 (20:51 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 25 Jun 2020 06:51:21 +0000 (08:51 +0200)
commit85fbebe61a1aec2f86e36fb464283b6b55d3d76d
tree3bfdcdef59f5bee19f10a35d38e8850c48114f2c
parentdb3b8d5d412bf905a77920f447d104dce09e00fb
journal: fix buffer overrun when urlifying

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21122.

message is only valid until message_len, and we need to make sure we're not
reading pass that. Bug introduced in 2108b56749ebb8d17f06d08b6ada2f79ae4f0.
src/shared/logs-show.c
test/fuzz/fuzz-journal-remote/oss-fuzz-21122 [new file with mode: 0644]