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:55:57 +1100
commitf050745fe69a538952f3e12af3718d19ef2df2e2 (patch)
treecc6c125933a08c2d25fe3840bcbfc60230529db4 /crypto/bn
parent68b78dd7e40f57064b0f24728d8b544fe583599c (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)
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)