diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-12-11 20:04:06 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-12-11 20:04:06 +0000 |
commit | b216664f666fa6c6371d1de0f6dd6292472e7f1e (patch) | |
tree | 5250508071030e6386dd732f27dae77df131fceb /crypto/pkcs7/pk7_lib.c | |
parent | d8223efd04f8526b602209ee5f39c06fa300beea (diff) |
Various S/MIME fixes.
Diffstat (limited to 'crypto/pkcs7/pk7_lib.c')
-rw-r--r-- | crypto/pkcs7/pk7_lib.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crypto/pkcs7/pk7_lib.c b/crypto/pkcs7/pk7_lib.c index 388a1d78b3..a13be9ae3a 100644 --- a/crypto/pkcs7/pk7_lib.c +++ b/crypto/pkcs7/pk7_lib.c @@ -227,8 +227,13 @@ int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *psi) } if (!j) /* we need to add another algorithm */ { - alg=X509_ALGOR_new(); + if(!(alg=X509_ALGOR_new()) + || !(alg->parameter = ASN1_TYPE_new())) { + PKCS7err(PKCS7_F_PKCS7_ADD_SIGNER,ERR_R_MALLOC_FAILURE); + return(0); + } alg->algorithm=OBJ_nid2obj(nid); + alg->parameter->type = V_ASN1_NULL; sk_X509_ALGOR_push(md_sk,alg); } |