Commit 1980d38
[nrf fromtree] Bluetooth: SDP: Check if frame len is consistent with attr list count
The total attributes list bytes count is only used to check the tail
room of response buffer. And the remaining frame length is used to
copy data from receiving buffer.
It does not check whether the remaining frame length is consistent with
the total attributes list bytes count.
Add the checking to make sure the attributes list is complete. And it
is used to make sure the response buffer can be accessed safety.
Signed-off-by: Lyle Zhu <[email protected]>
(cherry picked from commit 50a3a6e)1 parent 86176f0 commit 1980d38
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2053 | 2053 | | |
2054 | 2054 | | |
2055 | 2055 | | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
2056 | 2060 | | |
2057 | | - | |
| 2061 | + | |
2058 | 2062 | | |
2059 | 2063 | | |
2060 | 2064 | | |
| |||
0 commit comments