by request: let BN_dup(NULL) just return NULL
authorBodo Möller <bodo@openssl.org>
Fri, 30 Jul 1999 19:22:57 +0000 (19:22 +0000)
committerBodo Möller <bodo@openssl.org>
Fri, 30 Jul 1999 19:22:57 +0000 (19:22 +0000)
crypto/bn/bn_lib.c

index 9c2c9d3..5d62d88 100644 (file)
@@ -489,6 +489,8 @@ BIGNUM *BN_dup(const BIGNUM *a)
        {
        BIGNUM *r;
 
+       if (a == NULL) return NULL;
+
        bn_check_top(a);
 
        r=BN_new();