]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix the null pointer dereference
authorKan <chenxinpingc2306@163.com>
Fri, 17 Dec 2021 02:56:26 +0000 (10:56 +0800)
committerPauli <pauli@openssl.org>
Sun, 19 Dec 2021 23:58:02 +0000 (10:58 +1100)
Fixed #17296

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17302)

crypto/bn/bn_print.c

index 69749a9fa7dcbe1d10ec7590c29108b7af89ac7c..17ac6e7cac1ca78e4d2a3fe7e3b573a089085018 100644 (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)