Skip to content

Commit

Permalink
bluetooth: host: Check bounds more explicitly
Browse files Browse the repository at this point in the history
Co-authored-by: Johan Hedberg <[email protected]>
Signed-off-by: Arkadiusz Kozdra <[email protected]>
  • Loading branch information
2 people authored and carlescufi committed Feb 28, 2023
1 parent 8848380 commit 642548d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ void bt_hci_le_adv_report(struct net_buf *buf)

evt = net_buf_pull_mem(buf, sizeof(*evt));

if (buf->len <= evt->length) {
if (buf->len < evt->length + sizeof(adv_info.rssi)) {
LOG_ERR("Unexpected end of buffer");
break;
}
Expand Down

0 comments on commit 642548d

Please sign in to comment.