summaryrefslogtreecommitdiffhomepage
path: root/process-packet.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2004-07-27 02:14:42 +0000
committerMatt Johnston <matt@ucc.asn.au>2004-07-27 02:14:42 +0000
commit471d28bd1035678289c744fb95ad4dd7df1b6868 (patch)
tree02ed2713158babd341e204e97db9371b00d9b36d /process-packet.c
parenta9c38fb37f5fc8796435c2bcbcdecf35cf802ca6 (diff)
- Rename common-packet.c to packet.c
- buf_burn the unencrypted read/write payload buffers after use to avoid sensitive contents sitting in memory for too long --HG-- extra : convert_revision : 19227d63bda554e819ae7df919bfd18911d5b4a0
Diffstat (limited to 'process-packet.c')
-rw-r--r--process-packet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/process-packet.c b/process-packet.c
index afa45ef..f9f6dee 100644
--- a/process-packet.c
+++ b/process-packet.c
@@ -116,7 +116,7 @@ void process_packet() {
* less-than-or-equal-to 60 ( == MAX_UNAUTH_PACKET_TYPE ).
* NOTE: if the protocol changes and new types are added, revisit this
* assumption */
- if ( !ses.authdone && type > MAX_UNAUTH_PACKET_TYPE ) {
+ if ( !ses.authstate.authdone && type > MAX_UNAUTH_PACKET_TYPE ) {
dropbear_exit("received message %d before userauth", type);
}
@@ -138,6 +138,7 @@ void process_packet() {
recv_unimplemented();
out:
+ buf_burn(ses.payload); /* Clear the memory to avoid swapping it out */
buf_free(ses.payload);
ses.payload = NULL;