From 0a06ad76a11d0952230a2a1f60c4112ff25255ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bodo=20M=C3=B6ller?= Date: Thu, 13 Oct 2011 14:21:39 +0000 Subject: [PATCH] Avoid failed assertion in BN_DEBUG builds --- crypto/bn/bn_gf2m.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crypto/bn/bn_gf2m.c b/crypto/bn/bn_gf2m.c index 70770a2536..2cd93ddc76 100644 --- a/crypto/bn/bn_gf2m.c +++ b/crypto/bn/bn_gf2m.c @@ -644,6 +644,9 @@ int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) ret = 1; err: +#ifdef BN_DEBUG /* BN_CTX_end would complain about the expanded form */ + bn_correct_top(c); +#endif BN_CTX_end(ctx); return ret; } -- 2.39.5