diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-06-23 21:48:13 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-06-23 21:48:13 +0800 |
commit | 5174f6d8bc39e2d7025e16122b27c048eb55c675 (patch) | |
tree | 8e03bc1ae370758140e181e3febb208861502703 /common-kex.c | |
parent | 2036b0500e240edb082cd98bf7d78de2df779e27 (diff) | |
download | dropbear-5174f6d8bc39e2d7025e16122b27c048eb55c675.tar.gz |
check ecc key return, fix null pointer crash
Diffstat (limited to 'common-kex.c')
-rw-r--r-- | common-kex.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common-kex.c b/common-kex.c index 2907715..e2b4f8e 100644 --- a/common-kex.c +++ b/common-kex.c @@ -703,6 +703,9 @@ void kexecdh_comb_key(struct kex_ecdh_param *param, buffer *pub_them, ecc_key *Q_C, *Q_S, *Q_them; Q_them = buf_get_ecc_raw_pubkey(pub_them, algo_kex->ecc_curve); + if (Q_them == NULL) { + dropbear_exit("ECC error"); + } ses.dh_K = dropbear_ecc_shared_secret(Q_them, ¶m->key); |