diff options
author | Jonas Maebe <jonas.maebe@elis.ugent.be> | 2013-12-08 23:05:56 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2014-12-04 23:48:44 +0100 |
commit | b1a08ac71f87ff5fb14a115879e6bcc74f85f08f (patch) | |
tree | 04ab2d5f647adda7b381bfc05dc8f941632ab73f /engines | |
parent | 860732276595f8763b3dfced95476559793c2072 (diff) | |
download | openssl-b1a08ac71f87ff5fb14a115879e6bcc74f85f08f.tar.gz |
capi_get_key: check for NULL after allocating key
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 edcebf1a3f..f7876f3bab 100644 --- a/engines/e_capi.c +++ b/engines/e_capi.c @@ -1498,6 +1498,8 @@ static CAPI_KEY *capi_get_key(CAPI_CTX *ctx, const TCHAR *contname, TCHAR *provn CAPI_KEY *key; DWORD dwFlags = 0; key = OPENSSL_malloc(sizeof(CAPI_KEY)); + if (key == NULL) + return NULL; if (sizeof(TCHAR)==sizeof(char)) CAPI_trace(ctx, "capi_get_key, contname=%s, provname=%s, type=%d\n", contname, provname, ptype); |