Commit 98e6f079 authored by Edgar Pek's avatar Edgar Pek Committed by Kurt Roeckx
Browse files

Fix null-pointer dereference



Signed-off-by: default avatarKurt Roeckx <kurt@roeckx.be>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(cherry picked from commit bcfa19a8)
parent f9551953
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -967,11 +967,11 @@ static int ubsec_dh_generate_key(DH *dh)

    if (dh->pub_key == NULL) {
        pub_key = BN_new();
        if (pub_key == NULL)
            goto err;
        pub_key_len = BN_num_bits(dh->p);
        if (bn_wexpand(pub_key, dh->p->top) == NULL)
            goto err;
        if (pub_key == NULL)
            goto err;
    } else {
        pub_key = dh->pub_key;
    }