diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index e810647f578fa..1b8d47a28166d 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -504,7 +504,7 @@ static BIGNUM *bin2bn(const unsigned char *s, int len, BIGNUM *ret, return ret; } n = ((len - 1) / BN_BYTES) + 1; /* Number of resulting bignum chunks */ - if (!ossl_assert(bn_wexpand(ret, (int)n) != NULL)) { + if (bn_wexpand(ret, (int)n) == NULL) { BN_free(bn); return NULL; }