From 8d85b33eb53ca9ae739aaa6a6f30cb65a1ac6135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bodo=20M=C3=B6ller?= Date: Fri, 30 Jul 1999 19:22:57 +0000 Subject: [PATCH] by request: let BN_dup(NULL) just return NULL --- crypto/bn/bn_lib.c | 2 ++ 1 file changed, 2 insertions(+) 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(); -- GitLab