Mercurial > dropbear
changeset 79:5a55bd66707f
- don't crash when trying to add to known_hosts if it doesn't exist
- comments
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 16 Aug 2004 08:59:11 +0000 |
parents | 677843bfa734 |
children | 07bcdccb3577 |
files | cli-kex.c common-kex.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/cli-kex.c Sun Aug 15 10:42:23 2004 +0000 +++ b/cli-kex.c Mon Aug 16 08:59:11 2004 +0000 @@ -255,5 +255,7 @@ fclose(hostsfile); } m_free(filename); - buf_free(line); + if (line != NULL) { + buf_free(line); + } }
--- a/common-kex.c Sun Aug 15 10:42:23 2004 +0000 +++ b/common-kex.c Mon Aug 16 08:59:11 2004 +0000 @@ -464,6 +464,8 @@ /* Initialises and generate one side of the diffie-hellman key exchange values. * See the ietf-secsh-transport draft, section 6, for details */ +/* dh_pub and dh_priv will be initialised by this function, and should be + * mp_clear()ed after finished */ void gen_kexdh_vals(mp_int *dh_pub, mp_int *dh_priv) { mp_int dh_p, dh_q, dh_g;