Diff between 1ed206f31e4cf41b805a81da46a88cc0ceba22a1 and bdd50fdd2d06fd367e09999e137927500773a892

Changed Files

File Additions Deletions Status
monitor/l2cap.c +8 -0 modified

Full Patch

diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index dc4d8ea..beb9495 100644
--- a/monitor/l2cap.c
+++ b/monitor/l2cap.c
@@ -886,6 +886,14 @@ static void sig_info_rsp(const struct l2cap_frame *frame)
 	data += sizeof(*pdu);
 	size -= sizeof(*pdu);
 
+	if (btohs(pdu->result) != 0x0000) {
+		if (size > 0) {
+			print_text(COLOR_ERROR, "invalid data size");
+			packet_hexdump(data, size);
+		}
+		return;
+	}
+
 	switch (btohs(pdu->type)) {
 	case 0x0001:
 		if (size != 2) {