From 99b3bbb4c06f43162af2a7328ef5e5c48e82a7bb Mon Sep 17 00:00:00 2001 From: dongshengyuan <545258830@qq.com> Date: Mon, 29 Jun 2026 14:53:35 +0800 Subject: [PATCH] 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 --- src/libsystemd/sd-journal/journal-verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd/sd-journal/journal-verify.c b/src/libsystemd/sd-journal/journal-verify.c index dd3b6f32d4..d214a68e68 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));