]> git.ipfire.org Git - thirdparty/bind9.git/commit
Avoid unspecified behaviour in name_test
authorTony Finch <fanf@isc.org>
Wed, 9 Nov 2022 17:32:05 +0000 (17:32 +0000)
committerTony Finch <dot@dotat.at>
Thu, 17 Nov 2022 08:44:27 +0000 (08:44 +0000)
commit2bb6208c57aa036f9ad58fecf7ab08d7bb79072f
tree3a088be47dd46ebb2019ecaae063f2f0eecc2d2e
parent2001a0cdeb83bbfd870dc6559383a21887448f2e
Avoid unspecified behaviour in name_test

C does not make any guarantees about the value of padding in a
structure, so bytewise comparison of two semantically equal structures
with padding can be spuriously non-equal due to non-equal padding
bytes.

Compare each member of name.attributes individually to avoid this
problem.
tests/dns/name_test.c