From: Kan Date: Thu, 16 Dec 2021 16:05:24 +0000 (+0800) Subject: Fix the null pointer dereference X-Git-Tag: openssl-3.2.0-alpha1~3178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f050745fe69a538952f3e12af3718d19ef2df2e2;p=thirdparty%2Fopenssl.git Fix the null pointer dereference Fixes #17296 Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/17297) --- diff --git a/crypto/bn/bn_conv.c b/crypto/bn/bn_conv.c index 4af546a25b8..6757f3d0aae 100644 --- a/crypto/bn/bn_conv.c +++ b/crypto/bn/bn_conv.c @@ -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)