journal: don't use startswith() on something that is not a NUL-terminated string
authorLennart Poettering <lennart@poettering.net>
Tue, 21 Jan 2020 09:49:58 +0000 (10:49 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 5 Feb 2020 16:34:53 +0000 (17:34 +0100)
commit9a135baa409deedbb21dd4d5f1d346f55d7e0d29
tree640324339ed999e9a6b0c31d4a40f90a34036ce5
parent1ff3972a0fddb0d3259db02a904ef29aedbdff1d
journal: don't use startswith() on something that is not a NUL-terminated string

Otherwise we might access memory coming after it that is not valid or
allocated.

Fixes: #14114
(cherry picked from commit e0567bc8adfe027052b78b40efb57d543924f138)
(cherry picked from commit ae59f1666ca62b94355cc6d126e8fcf67f0715ca)
src/journal/sd-journal.c