From: Kan Date: Fri, 17 Dec 2021 02:56:26 +0000 (+0800) Subject: Fix the null pointer dereference X-Git-Tag: OpenSSL_1_1_1n~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2f7cff20377f7402b132a19d953a9d998be26aa;p=thirdparty%2Fopenssl.git Fix the null pointer dereference Fixed #17296 Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/17302) --- diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index 69749a9fa7d..17ac6e7cac1 100644 --- a/crypto/bn/bn_print.c +++ b/crypto/bn/bn_print.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)