]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix: test: Fix CID 510858: Null ptr derefs in check_keys
authorMatthijs Mekking <matthijs@isc.org>
Fri, 25 Oct 2024 11:20:03 +0000 (11:20 +0000)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 25 Oct 2024 11:20:03 +0000 (11:20 +0000)
Coverity Scan reported a new issue for the ksr system test. There is allegedly a null pointer dereference (FORWARD_NULL) in check_keys().

This popped up because previously we set 'retired' to 0 in case of unlimited lifetime, but we changed it to None.

It is actually a false positive, because if lifetime is unlimited there will be only one key in 'keys'.

However, the code would be better if we always initialized 'active' and if it is not the first key and retired is set, set the successor key's active time to the retire time of the predecessor key.

Closes #5004

Merge branch '5004-cid-510858-ksr-check-keys' into 'main'

See merge request isc-projects/bind9!9687


Trivial merge