From: Bodo Möller Date: Fri, 30 Jul 1999 19:22:57 +0000 (+0000) Subject: by request: let BN_dup(NULL) just return NULL X-Git-Tag: OpenSSL_0_9_4~45 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=8d85b33eb53ca9ae739aaa6a6f30cb65a1ac6135 by request: let BN_dup(NULL) just return NULL --- diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 9c2c9d3238..5d62d88e8b 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -489,6 +489,8 @@ BIGNUM *BN_dup(const BIGNUM *a) { BIGNUM *r; + if (a == NULL) return NULL; + bn_check_top(a); r=BN_new();