mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 19:07:28 +00:00
- Payload length doesn't include macsize.
--HG-- extra : convert_revision : 98ac17a573ab350cbd6e358b3943237d2ad5c9cf
This commit is contained in:
parent
3608775306
commit
bcd541d65f
2
debug.h
2
debug.h
@ -39,7 +39,7 @@
|
|||||||
* Caution: Don't use this in an unfriendly environment (ie unfirewalled),
|
* Caution: Don't use this in an unfriendly environment (ie unfirewalled),
|
||||||
* since the printing may not sanitise strings etc. This will add a reasonable
|
* since the printing may not sanitise strings etc. This will add a reasonable
|
||||||
* amount to your executable size. */
|
* amount to your executable size. */
|
||||||
/*#define DEBUG_TRACE*/
|
#define DEBUG_TRACE
|
||||||
|
|
||||||
/* All functions writing to the cleartext payload buffer call
|
/* All functions writing to the cleartext payload buffer call
|
||||||
* CHECKCLEARTOWRITE() before writing. This is only really useful if you're
|
* CHECKCLEARTOWRITE() before writing. This is only really useful if you're
|
||||||
|
2
packet.c
2
packet.c
@ -261,7 +261,7 @@ void decrypt_packet() {
|
|||||||
|
|
||||||
/* payload length */
|
/* payload length */
|
||||||
/* - 4 - 1 is for LEN and PADLEN values */
|
/* - 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)) {
|
if ((len > RECV_MAX_PAYLOAD_LEN) || (len < 1)) {
|
||||||
dropbear_exit("bad packet size");
|
dropbear_exit("bad packet size");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user