]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix the assertion failure when putting 48-bit number to buffer
authorOndřej Surý <ondrej@isc.org>
Thu, 25 Jul 2024 18:30:03 +0000 (20:30 +0200)
committerOndřej Surý <ondrej@isc.org>
Mon, 5 Aug 2024 07:55:18 +0000 (09:55 +0200)
commit37dbd57c163049cea87d9984b1b413b923aed23c
treec4037578395af6c257790cc9da95d2434fff0c12
parent026024a6aedc704ec08a9f76b8504f70f39703e5
Fix the assertion failure when putting 48-bit number to buffer

When putting the 48-bit number into a fixed-size buffer that's exactly 6
bytes, the assertion failure would occur as the 48-bit number is
internally represented as 64-bit number and the code was checking if
there is enough space for `sizeof(val)`.  This causes assertion failure
when otherwise valid TSIG signature has a bad timing information.

Specify the size of the argument explicitly, so the 48-bit number
doesn't require 8-byte long buffer.
lib/isc/include/isc/buffer.h