mirror of
https://github.com/openssl/openssl.git
synced 2025-03-25 20:00:44 +08:00
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>
This commit is contained in:
parent
6f77f82bfc
commit
34374c2d2c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user