mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 23:55:27 +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:
@@ -790,7 +790,7 @@ err:
|
|||||||
static isc_result_t
|
static isc_result_t
|
||||||
opensslrsa_tofile(const dst_key_t *key, const char *directory) {
|
opensslrsa_tofile(const dst_key_t *key, const char *directory) {
|
||||||
isc_result_t ret;
|
isc_result_t ret;
|
||||||
dst_private_t priv;
|
dst_private_t priv = { 0 };
|
||||||
unsigned char *bufs[8] = { NULL };
|
unsigned char *bufs[8] = { NULL };
|
||||||
unsigned short i = 0;
|
unsigned short i = 0;
|
||||||
EVP_PKEY *pkey;
|
EVP_PKEY *pkey;
|
||||||
@@ -810,7 +810,6 @@ opensslrsa_tofile(const dst_key_t *key, const char *directory) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (key->external) {
|
if (key->external) {
|
||||||
priv.nelements = 0;
|
|
||||||
return (dst__privstruct_writefile(key, &priv, directory));
|
return (dst__privstruct_writefile(key, &priv, directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user