diff options
author | Edgar Pek <edgar.pek@gmail.com> | 2015-02-21 14:56:41 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2015-02-22 13:20:10 +0100 |
commit | bcfa19a8d19506c26b5f8d9d9934ca2aa5f96b43 (patch) | |
tree | 968495daa8ea1b53b183b9a35c8609f36b93d3a9 /engines | |
parent | edac5dc220d494dff7ee259dfd84335ffa50e938 (diff) | |
download | openssl-bcfa19a8d19506c26b5f8d9d9934ca2aa5f96b43.tar.gz |
Fix null-pointer dereference
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'engines')
-rw-r--r-- | engines/e_ubsec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/e_ubsec.c b/engines/e_ubsec.c index 2d6331d690..6f09ffb965 100644 --- a/engines/e_ubsec.c +++ b/engines/e_ubsec.c @@ -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; } |