summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-12-28 15:35:10 -0800
committerMarcel Holtmann <marcel@holtmann.org>2012-12-28 15:35:10 -0800
commit624b0785dd8e8ba4dc9a0969fdf6dd8f51251b66 (patch)
tree25395251e058d325ef4bdc3c4183463e77cd1c77 /monitor
parentfb2e295dd87b58303531b5e1f37de6d78a5bfca6 (diff)
monitor: Fix handling of unknown L2CAP options
Diffstat (limited to 'monitor')
-rw-r--r--monitor/l2cap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index beb949525..7602673de 100644
--- a/monitor/l2cap.c
+++ b/monitor/l2cap.c
@@ -433,9 +433,15 @@ static void print_config_options(const struct l2cap_frame *frame,
print_field("Option: %s (0x%2.2x)", str, type);
+ if (expect_len == 0) {
+ consumed += 2;
+ break;
+ }
+
if (len != expect_len) {
print_text(COLOR_ERROR, "wrong option size (%d != %d)",
len, expect_len);
+ consumed += 2;
break;
}