mirror of
https://github.com/clearml/dropbear
synced 2025-03-03 18:52:00 +00:00
check ecc key return, fix null pointer crash
This commit is contained in:
parent
2e05a2b8c4
commit
839e023ed8
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user