From f2f7cff20377f7402b132a19d953a9d998be26aa Mon Sep 17 00:00:00 2001 From: Kan Date: Fri, 17 Dec 2021 10:56:26 +0800 Subject: Fix the null pointer dereference Fixed #17296 Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/17302) --- crypto/bn/bn_print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/bn') diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index 69749a9fa7..17ac6e7cac 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) -- cgit v1.2.3