summaryrefslogtreecommitdiffstats
path: root/crypto/bn
diff options
context:
space:
mode:
authorKan <chenxinpingc2306@163.com>2021-12-17 00:05:24 +0800
committerPauli <pauli@openssl.org>2021-12-20 10:56:30 +1100
commitfb88450626e313e16e6f3488e369d29d5be8375f (patch)
treee6b1413781848e458e0ebf0d4cc48427e9af2cc1 /crypto/bn
parent7f2dace8d5969703e36cd9bdeff606d1f6fee3c8 (diff)
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) (cherry picked from commit f050745fe69a538952f3e12af3718d19ef2df2e2)
Diffstat (limited to 'crypto/bn')
-rw-r--r--crypto/bn/bn_conv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_conv.c b/crypto/bn/bn_conv.c
index 4af546a25b..6757f3d0aa 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)