Diff between fb2e295dd87b58303531b5e1f37de6d78a5bfca6 and 624b0785dd8e8ba4dc9a0969fdf6dd8f51251b66

Changed Files

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

Full Patch

diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index beb9495..7602673 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;
 		}