diff options
author | Jonas Maebe <jonas.maebe@elis.ugent.be> | 2013-12-08 18:12:13 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2014-08-17 18:52:44 +0200 |
commit | 34374c2d2c94435a96d98b6527d04417849c0971 (patch) | |
tree | 63e27e492e845b42f57c79b92d4b0ad48abc4216 /crypto/hmac/hm_ameth.c | |
parent | dev_crypto_md5_copy: return error if allocating to_md->data fails (diff) | |
download | openssl-34374c2d2c94435a96d98b6527d04417849c0971.tar.xz openssl-34374c2d2c94435a96d98b6527d04417849c0971.zip |
old_hmac_encode: check for NULL result when allocating *pder
Signed-off-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/hmac/hm_ameth.c')
-rw-r--r-- | crypto/hmac/hm_ameth.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/hmac/hm_ameth.c b/crypto/hmac/hm_ameth.c index a6aa793110..3d998e94da 100644 --- a/crypto/hmac/hm_ameth.c +++ b/crypto/hmac/hm_ameth.c @@ -123,6 +123,8 @@ static int old_hmac_encode(const EVP_PKEY *pkey, unsigned char **pder) if (!*pder) { *pder = OPENSSL_malloc(os->length); + if (*pder == NULL) + return -1; inc = 0; } else inc = 1; |