From: dongshengyuan <545258830@qq.com> Date: Mon, 29 Jun 2026 06:53:35 +0000 (+0800) Subject: journal-verify: fix offset reported for tail hash mismatch X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=99b3bbb4c06f43162af2a7328ef5e5c48e82a7bb;p=thirdparty%2Fsystemd.git journal-verify: fix offset reported for tail hash mismatch After walking a hash chain, the loop exits with p == 0. The error() call for a tail_hash_offset mismatch passed p as the file offset, printing 0000000000000000 instead of the actual last data object. Pass 'last' instead, which holds the offset of the final chain entry. Signed-off-by: dongshengyuan --- diff --git a/src/libsystemd/sd-journal/journal-verify.c b/src/libsystemd/sd-journal/journal-verify.c index dd3b6f32d49..d214a68e686 100644 --- a/src/libsystemd/sd-journal/journal-verify.c +++ b/src/libsystemd/sd-journal/journal-verify.c @@ -590,7 +590,7 @@ static int verify_data_hash_table( } if (last != le64toh(f->data_hash_table[i].tail_hash_offset)) { - error(p, + error(last, "Tail hash pointer mismatch in hash table (%"PRIu64" != %"PRIu64")", last, le64toh(f->data_hash_table[i].tail_hash_offset));