# HG changeset patch # User Matt Johnston # Date 1435067293 -28800 # Node ID a9e074b78cd5caab6b41c2d6de22f859a0da7193 # Parent b803ad2b9f4ccf8c13a2f63be211be8bda800d8b check ecc key return, fix null pointer crash diff -r b803ad2b9f4c -r a9e074b78cd5 common-kex.c --- a/common-kex.c Fri Jun 12 22:57:48 2015 +0800 +++ b/common-kex.c Tue Jun 23 21:48:13 2015 +0800 @@ -703,6 +703,9 @@ 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);