2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Silence Coverity false positive

Coverity if failing to determine that 'priv.elements[i].length' is
actually valid when 'buf[i]' is non-NULL.  Initialise 'priv' to
zeros.
This commit is contained in:
Mark Andrews
2021-11-03 20:10:34 +11:00
parent 4bebcd4503
commit 6b6c89b3ea

View File

@@ -790,7 +790,7 @@ err:
static isc_result_t
opensslrsa_tofile(const dst_key_t *key, const char *directory) {
isc_result_t ret;
dst_private_t priv;
dst_private_t priv = { 0 };
unsigned char *bufs[8] = { NULL };
unsigned short i = 0;
EVP_PKEY *pkey;
@@ -810,7 +810,6 @@ opensslrsa_tofile(const dst_key_t *key, const char *directory) {
}
if (key->external) {
priv.nelements = 0;
return (dst__privstruct_writefile(key, &priv, directory));
}