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 13:45:17 +0000 (14:45 +0100)
commitae59f1666ca62b94355cc6d126e8fcf67f0715ca
tree61176ff18c8f03fdc04db4edef2267b3fb6f396e
parent536ef6d72bc6cd76f3aff02d3bbbd17810216cce
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)
src/journal/sd-journal.c