]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal-file: do not trigger assertion on removed or corrupted journal file
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 18 Jan 2026 10:15:31 +0000 (19:15 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 18 Jan 2026 12:25:20 +0000 (21:25 +0900)
commit112cbc37906fb97afe0ad04164262cf62d0af5e9
tree98fec03a5d155ffc326743cd698d5716472721fd
parent103f7d23037f575909375b5a21ca1545bbca6c1f
journal-file: do not trigger assertion on removed or corrupted journal file

When a journal file is removed or corrupted, then the value `p`, which is
read from Object.data.entry_offset, may be zero.

Note, journal_file_move_to_object() checks the passed offset and return
-EBADMSG if it is invalid.

Fixes the issue reported at
https://github.com/systemd/systemd/pull/40372#issuecomment-3762907261.
src/libsystemd/sd-journal/journal-file.c