diff options
Diffstat (limited to 'monitor/sdp.c')
-rw-r--r-- | monitor/sdp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/monitor/sdp.c b/monitor/sdp.c index 13a8807c7..36708f426 100644 --- a/monitor/sdp.c +++ b/monitor/sdp.c @@ -585,6 +585,10 @@ static void service_rsp(const struct l2cap_frame *frame, struct tid_data *tid) } count = get_be16(frame->data + 2); + if (count * 4 > frame->size) { + print_text(COLOR_ERROR, "invalid record count"); + return; + } print_field("Total record count: %d", get_be16(frame->data)); print_field("Current record count: %d", count); |