diff options
author | Matt Johnston <matt@ucc.asn.au> | 2009-07-26 16:11:27 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2009-07-26 16:11:27 +0000 |
commit | 61a3145d94244bc693ae02746ad1a566e87ddbab (patch) | |
tree | 96fdafb2327a2b0cdb8f86afc8d9a918e95a0abd | |
parent | 462544e04977e37ec83174b3d3e7277992c016c7 (diff) | |
download | dropbear-61a3145d94244bc693ae02746ad1a566e87ddbab.tar.gz |
- Payload length doesn't include macsize.
-rw-r--r-- | debug.h | 2 | ||||
-rw-r--r-- | packet.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -39,7 +39,7 @@ * Caution: Don't use this in an unfriendly environment (ie unfirewalled), * since the printing may not sanitise strings etc. This will add a reasonable * amount to your executable size. */ -/*#define DEBUG_TRACE*/ +#define DEBUG_TRACE /* All functions writing to the cleartext payload buffer call * CHECKCLEARTOWRITE() before writing. This is only really useful if you're @@ -261,7 +261,7 @@ void decrypt_packet() { /* payload length */ /* - 4 - 1 is for LEN and PADLEN values */ - len = ses.readbuf->len - padlen - 4 - 1; + len = ses.readbuf->len - padlen - 4 - 1 - macsize; if ((len > RECV_MAX_PAYLOAD_LEN) || (len < 1)) { dropbear_exit("bad packet size"); } |