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)
|
if (!*pder)
|
||||||
{
|
{
|
||||||
*pder = OPENSSL_malloc(os->length);
|
*pder = OPENSSL_malloc(os->length);
|
||||||
|
if (*pder == NULL)
|
||||||
|
return -1;
|
||||||
inc = 0;
|
inc = 0;
|
||||||
}
|
}
|
||||||
else inc = 1;
|
else inc = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user