Fix the null pointer dereference

Fixes #17296

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17297)
This commit is contained in:
Kan 2021-12-17 00:05:24 +08:00 committed by Pauli
parent 68b78dd7e4
commit f050745fe6
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ int BN_hex2bn(BIGNUM **bn, const char *a)
continue;
if (i == 0 || i > INT_MAX / 4)
goto err;
return 0;
num = i + neg;
if (bn == NULL)