CID 510858: Null pointer dereferences (FORWARD_NULL) in check_keys()
Coverity Scan report for a new test:
/bin/tests/system/ksr/tests_ksr.py: 122 in check_keys()
116 if num == 0:
117 active = created
118 else:
119 active = retired
120
121 # published: dnskey-ttl + publish-safety + propagation
>>> CID 510858: Null pointer dereferences (FORWARD_NULL)
>>> Invalid operation on null-like value "active".
122 published = active - timedelta(hours=2, minutes=5)
123
124 # retired: zsk-lifetime
125 if lifetime is not None:
126 retired = active + lifetime
127 # removed: ttlsig + retire-safety + sign-delay + propagation
The logic in Coverity Scan seems to be as follows: lifetime
is None
, retired = None
, in the subsequent iteration active = retired
, and finally: published = active - timedelta(hours=2, minutes=5)
.