Coverity reports CHECKED_RETURN defects in keymgr
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 304937: (CHECKED_RETURN)
/lib/dns/keymgr.c: 2004 in dns_keymgr_status()
/lib/dns/keymgr.c: 2005 in dns_keymgr_status()
________________________________________________________________________________________________________
*** CID 304937: (CHECKED_RETURN)
/lib/dns/keymgr.c: 2004 in dns_keymgr_status()
1998
1999 if (dst_key_is_unused(dkey->key)) {
2000 continue;
2001 }
2002
2003 // key data
>>> CID 304937: (CHECKED_RETURN)
>>> Calling "dst_key_getbool" without checking return value (as is done elsewhere 25 out of 29 times).
2004 dst_key_getbool(dkey->key, DST_BOOL_KSK, &ksk);
2005 dst_key_getbool(dkey->key, DST_BOOL_ZSK, &zsk);
2006 dns_secalg_format((dns_secalg_t)dst_key_alg(dkey->key), algstr,
2007 sizeof(algstr));
2008 isc_buffer_printf(&buf, "\nkey: %d (%s), %s\n",
2009 dst_key_id(dkey->key), algstr,
/lib/dns/keymgr.c: 2005 in dns_keymgr_status()
1999 if (dst_key_is_unused(dkey->key)) {
2000 continue;
2001 }
2002
2003 // key data
2004 dst_key_getbool(dkey->key, DST_BOOL_KSK, &ksk);
>>> CID 304937: (CHECKED_RETURN)
>>> Calling "dst_key_getbool" without checking return value (as is done elsewhere 25 out of 29 times).
2005 dst_key_getbool(dkey->key, DST_BOOL_ZSK, &zsk);
2006 dns_secalg_format((dns_secalg_t)dst_key_alg(dkey->key), algstr,
2007 sizeof(algstr));
2008 isc_buffer_printf(&buf, "\nkey: %d (%s), %s\n",
2009 dst_key_id(dkey->key), algstr,
2010 keymgr_keyrole(dkey->key));
Edited by Matthijs Mekking