summaryrefslogtreecommitdiffhomepage
path: root/packet.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2009-07-26 16:11:27 +0000
committerMatt Johnston <matt@ucc.asn.au>2009-07-26 16:11:27 +0000
commitbcd541d65f93365ff665749419844620ec2c6eeb (patch)
tree96fdafb2327a2b0cdb8f86afc8d9a918e95a0abd /packet.c
parent3608775306a0959d6cdbefa428c1e6d3af5d8af2 (diff)
- Payload length doesn't include macsize.
--HG-- extra : convert_revision : 98ac17a573ab350cbd6e358b3943237d2ad5c9cf
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index 37ffdd2..9621bbd 100644
--- a/packet.c
+++ b/packet.c
@@ -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");
}