diff options
-rw-r--r-- | lib/ncrypto_nss.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ncrypto_nss.c b/lib/ncrypto_nss.c index 70868a8..2879f49 100644 --- a/lib/ncrypto_nss.c +++ b/lib/ncrypto_nss.c @@ -236,6 +236,7 @@ private_key_create (struct ncr_private_key **key, CK_KEY_TYPE type, der_input.version.type = siUnsignedInteger; der_input.version.data = (void *)&zero; der_input.version.len = sizeof (zero); + memset (&der_input.algorithm, 0, sizeof (der_input.algorithm)); if (SECOID_SetAlgorithmID (NULL, &der_input.algorithm, alg_tag, NULL) != SECSuccess) { @@ -276,6 +277,7 @@ private_key_create (struct ncr_private_key **key, CK_KEY_TYPE type, &iv_item); if (ctx == NULL) goto err_wrapping_key; + memset (&wrapped_item, 0, sizeof (wrapped_item)); if (SECITEM_AllocItem (NULL, &wrapped_item, der_info.len + 16) == NULL) { PK11_DestroyContext (ctx, PR_TRUE); |