]> git.ipfire.org Git - thirdparty/bind9.git/commit
Address Coverity warnings in keymgr.c
authorMatthijs Mekking <matthijs@isc.org>
Mon, 6 Apr 2020 07:59:18 +0000 (09:59 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Mon, 20 Apr 2020 07:43:23 +0000 (09:43 +0200)
commit7ac4966a7a0960977a38b755b2c6b27cc78bc80e
treec537c82dd3f30e6ce86608545d43fc9eb28f87d6
parent844cb55109b69ecefa051637255ac857e8905952
Address Coverity warnings in keymgr.c

Coverity showed that the return value of `dst_key_gettime` was
unchecked in INITIALIZE_STATE. If DST_TIME_CREATED was not set we
would set the state to be initialized to a weird last changed time.

This would normally not happen because DST_TIME_CREATED is always
set. However, we would rather set the time to now (as the comment
also indicates) not match the creation time.

The comment on INITIALIZE_STATE also needs updating as we no
longer always initialize to HIDDEN.

(cherry picked from commit 564f9dca3578234214eaffc4f6220a73315dde8f)
CHANGES
lib/dns/keymgr.c