Commit f08e8034 authored by Matt Caswell's avatar Matt Caswell
Browse files

Check that we were actually allocated BIGNUMs in dsa_builtin_paramgen2



Calls to BN_CTX_get() can fail so we should check that they were
successful.

Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
parent 22803581
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -406,6 +406,8 @@ int dsa_builtin_paramgen2(DSA *ret, size_t L, size_t N,
    X = BN_CTX_get(ctx);
    c = BN_CTX_get(ctx);
    test = BN_CTX_get(ctx);
    if (test == NULL)
        goto err;

    /* if p, q already supplied generate g only */
    if (ret->p && ret->q) {