summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/bn/bn_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/bn/bn_lib.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/bn/bn_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Cryptlib/OpenSSL/crypto/bn/bn_lib.c b/Cryptlib/OpenSSL/crypto/bn/bn_lib.c
index 10b78f51..2671f35c 100644
--- a/Cryptlib/OpenSSL/crypto/bn/bn_lib.c
+++ b/Cryptlib/OpenSSL/crypto/bn/bn_lib.c
@@ -496,6 +496,9 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
if (bn_wexpand(a, b->top) == NULL)
return (NULL);
+ if (!a || !b || !a->d || !b->d)
+ return (NULL);
+
#if 1
A = a->d;
B = b->d;