From: Ulf Möller Date: Sat, 6 Dec 2003 11:39:37 +0000 (+0000) Subject: Avoid segfault if ret==0. X-Git-Tag: BEN_FIPS_TEST_5~13^2~20 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ce38bb1a8c68db205069dc4595afcd02594c9d98;p=oweals%2Fopenssl.git Avoid segfault if ret==0. Submitted by: Nils Larsch --- diff --git a/crypto/bn/bn_gcd.c b/crypto/bn/bn_gcd.c index f02e6fcdb4..0248753f6d 100644 --- a/crypto/bn/bn_gcd.c +++ b/crypto/bn/bn_gcd.c @@ -488,6 +488,7 @@ BIGNUM *BN_mod_inverse(BIGNUM *in, err: if ((ret == NULL) && (in == NULL)) BN_free(R); BN_CTX_end(ctx); - bn_check_top(ret); + if (ret) + bn_check_top(ret); return(ret); }