OSDN Git Service
(root)
/
android-x86
/
system-bt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f2114c
)
Decrease length after reading from array in process_service_attr_req
author
Jakub Pawlowski
<jpawlowski@google.com>
Tue, 29 May 2018 23:25:56 +0000
(16:25 -0700)
committer
Ryan Longair
<rlongair@google.com>
Tue, 12 Jun 2018 18:14:33 +0000
(11:14 -0700)
Test: compilation
Bug:
78136677
Change-Id: I4807a350e2b4764a93f104ce88f23a957a7e85c0
Merged-In: I4807a350e2b4764a93f104ce88f23a957a7e85c0
(cherry picked from commit
76e962892ea1419f69e3c7e26a09fa77948c46e6
)
stack/sdp/sdp_server.c
patch
|
blob
|
history
diff --git
a/stack/sdp/sdp_server.c
b/stack/sdp/sdp_server.c
index
2d34406
..
100d35b
100644
(file)
--- a/
stack/sdp/sdp_server.c
+++ b/
stack/sdp/sdp_server.c
@@
-351,9
+351,11
@@
static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
/* Extract the record handle */
BE_STREAM_TO_UINT32 (rec_handle, p_req);
+ param_len -= sizeof(rec_handle);
/* Get the max list length we can send. Cap it at MTU size minus overhead */
BE_STREAM_TO_UINT16 (max_list_len, p_req);
+ param_len -= sizeof(max_list_len);
if (max_list_len > (p_ccb->rem_mtu_size - SDP_MAX_ATTR_RSPHDR_LEN))
max_list_len = p_ccb->rem_mtu_size - SDP_MAX_ATTR_RSPHDR_LEN;