From: Mark Andrews Date: Thu, 1 Apr 2021 04:30:42 +0000 (+1100) Subject: Compute transaction size based on journal/transaction type X-Git-Tag: v9.17.12~9^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=520509ac7e8bd2fea27b937620688289c2e20b29;p=thirdparty%2Fbind9.git Compute transaction size based on journal/transaction type previously the code assumed that it was a new transaction. --- diff --git a/lib/dns/journal.c b/lib/dns/journal.c index cbc5a1c7f2b..0beea59ca9d 100644 --- a/lib/dns/journal.c +++ b/lib/dns/journal.c @@ -1318,7 +1318,8 @@ dns_journal_commit(dns_journal_t *j) { if (j->state == JOURNAL_STATE_TRANSACTION) { isc_offset_t offset; offset = (j->x.pos[1].offset - j->x.pos[0].offset) - - sizeof(journal_rawxhdr_t); + (j->header_ver1 ? sizeof(journal_rawxhdr_ver1_t) + : sizeof(journal_rawxhdr_t)); /* * Update the transaction header. */