Diff between 5ceef2cbde0b4407e61dc2370780bda895c8019c and f01e006a26e42581c092efc10b68c2f51f3bb6f3

Changed Files

File Additions Deletions Status
monitor/packet.c +1 -1 modified

Full Patch

diff --git a/monitor/packet.c b/monitor/packet.c
index 413a889..cbb3d2b 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -10278,7 +10278,7 @@ void packet_ctrl_open(struct timeval *tv, struct ucred *cred, uint16_t index,
 		flags = get_le32(data + 3);
 		ident_len = get_u8(data + 7);
 
-		if (ident_len > size) {
+		if ((8 + ident_len) > size) {
 			print_packet(tv, cred, '*', index, NULL, COLOR_ERROR,
                                 "Malformed Control Open packet", NULL, NULL);
 			return;