From bdd50fdd2d06fd367e09999e137927500773a892 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 20 Dec 2012 02:44:20 +0100 Subject: [PATCH] monitor: L2CAP information respones don't have a payload --- monitor/l2cap.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/monitor/l2cap.c b/monitor/l2cap.c index dc4d8eae5..beb949525 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) { -- 2.47.3