We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7d3ae5 commit ec0865cCopy full SHA for ec0865c
subsys/bluetooth/host/classic/sdp.c
@@ -2588,6 +2588,16 @@ static inline ssize_t sdp_get_seq_len(const uint8_t *data, size_t len)
2588
return 3 + sys_get_be16(pnext);
2589
case BT_SDP_SEQ32:
2590
case BT_SDP_ALT32:
2591
+ /* validate len for pnext safe use to read 32bit value */
2592
+ if (len < 5) {
2593
+ break;
2594
+ }
2595
+
2596
+ if (len < (5 + sys_get_be32(pnext))) {
2597
2598
2599
2600
+ return 5 + sys_get_be32(pnext);
2601
default:
2602
LOG_ERR("Invalid/unhandled DTD 0x%02x", data[0]);
2603
return -EINVAL;
0 commit comments