Mercurial > dropbear
changeset 648:4222a1039b06
Clear a few buffers when possible
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 10 Feb 2012 18:32:18 +0800 |
parents | a98e2ced7bfa |
children | 234cf769bcb3 |
files | circbuffer.c common-kex.c |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/circbuffer.c Tue Nov 08 00:01:47 2011 +0800 +++ b/circbuffer.c Fri Feb 10 18:32:18 2012 +0800 @@ -48,6 +48,7 @@ void cbuf_free(circbuffer * cbuf) { + m_burn(cbuf->data, cbuf->size); m_free(cbuf->data); m_free(cbuf); }
--- a/common-kex.c Tue Nov 08 00:01:47 2011 +0800 +++ b/common-kex.c Fri Feb 10 18:32:18 2012 +0800 @@ -366,6 +366,11 @@ ses.keys = ses.newkeys; ses.newkeys = NULL; + m_burn(C2S_IV, sizeof(C2S_IV)); + m_burn(C2S_key, sizeof(C2S_key)); + m_burn(S2C_IV, sizeof(S2C_IV)); + m_burn(S2C_key, sizeof(S2C_key)); + TRACE(("leave gen_new_keys")) }