diff options
author | Jonas Maebe <jonas.maebe@elis.ugent.be> | 2013-12-08 23:05:23 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2014-12-04 23:48:44 +0100 |
commit | 860732276595f8763b3dfced95476559793c2072 (patch) | |
tree | 4c6aa28369c192b381eb6c07050171a512f55af2 /engines | |
parent | e2140501fd366c5af617f9210160e383cf4b2c86 (diff) | |
download | openssl-860732276595f8763b3dfced95476559793c2072.tar.gz |
capi_cert_get_fname: check for NULL after allocating wfname
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'engines')
-rw-r--r-- | engines/e_capi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/e_capi.c b/engines/e_capi.c index f06d298324..edcebf1a3f 100644 --- a/engines/e_capi.c +++ b/engines/e_capi.c @@ -1333,6 +1333,8 @@ char * capi_cert_get_fname(CAPI_CTX *ctx, PCCERT_CONTEXT cert) if (!CertGetCertificateContextProperty(cert, CERT_FRIENDLY_NAME_PROP_ID, NULL, &dlen)) return NULL; wfname = OPENSSL_malloc(dlen); + if (wfname == NULL) + return NULL; if (CertGetCertificateContextProperty(cert, CERT_FRIENDLY_NAME_PROP_ID, wfname, &dlen)) { char *fname = wide_to_asc(wfname); |