# HG changeset patch # User Matt Johnston # Date 1092646751 0 # Node ID 5a55bd66707f1492091a21e9894cf3e1875faa94 # Parent 677843bfa734238a67636b461a02c110c462ffaf - don't crash when trying to add to known_hosts if it doesn't exist - comments diff -r 677843bfa734 -r 5a55bd66707f cli-kex.c --- 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); + } } diff -r 677843bfa734 -r 5a55bd66707f common-kex.c --- 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;