Commit 4d94bd36 authored by Matt Caswell's avatar Matt Caswell
Browse files

Check for malloc error in bn_x931p.c



Ensure BN_CTX_get() has been successful

Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
parent 4162c7d3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -74,6 +74,9 @@ int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,

    pm1 = BN_CTX_get(ctx);

    if (pm1 == NULL)
        goto err;

    if (!bn_x931_derive_pi(p1, Xp1, ctx, cb))
        goto err;