]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal: replace a bunch of assert() with friendlier checks 37757/head
authorLennart Poettering <lennart@poettering.net>
Thu, 5 Jun 2025 20:26:03 +0000 (22:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 5 Jun 2025 20:31:41 +0000 (22:31 +0200)
commit5ee8b3edb385b216eb4f3316323ae1287824971a
treedb15e6d2b0d17c523541de960678331732540756
parent813facd3ba59865c127ebaf5eb8e8884e7ccb689
journal: replace a bunch of assert() with friendlier checks

We should not rely that data stored in the journal files remains
entirely untouched at all times. Because we unallocate files, data might
go away any time. Hence, never assert() on any expectations on what the
file contains. Instead, handle it more gracefully as a corruption issue,
and return EBADMSG.

Fixes: #35229 #32436
src/libsystemd/sd-journal/journal-file.c