diff options
author | Matt Johnston <matt@ucc.asn.au> | 2012-02-10 18:32:18 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2012-02-10 18:32:18 +0800 |
commit | 4525dd1e15578718e66989a008232834c19502d2 (patch) | |
tree | 5f5df16899a6f082c9f8ff78b90ec1020f58378e | |
parent | 0ae6d874291c2e21e5ca8369cf36b58e98548139 (diff) | |
download | dropbear-4525dd1e15578718e66989a008232834c19502d2.tar.gz |
Clear a few buffers when possible
-rw-r--r-- | circbuffer.c | 1 | ||||
-rw-r--r-- | common-kex.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/circbuffer.c b/circbuffer.c index f19b70a..7953737 100644 --- a/circbuffer.c +++ b/circbuffer.c @@ -48,6 +48,7 @@ circbuffer * cbuf_new(unsigned int size) { void cbuf_free(circbuffer * cbuf) { + m_burn(cbuf->data, cbuf->size); m_free(cbuf->data); m_free(cbuf); } diff --git a/common-kex.c b/common-kex.c index 173bf8c..2b3472b 100644 --- a/common-kex.c +++ b/common-kex.c @@ -366,6 +366,11 @@ void gen_new_keys() { 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")) } |