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 <dongshengyuan@uniontech.com>
}
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));