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 9c2c9d3238a4b682c1e73eab6f0788a658fa8e9a..5d62d88e8b603ed4ad06c4becbfb45e7e0a8d8c2 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();