diff options
author | Zongheng Wang <wangzongheng@google.com> | 2019-09-27 14:45:57 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-09-27 14:45:57 -0700 |
commit | 4a8fc7789e1d856cd042d502cac4832300d99b14 (patch) | |
tree | f55ee02e8caca4ebb7debc4e2e5b4049ac9f52d6 | |
parent | 5d03b9c3fd9f3515b1aa67f68067934637647746 (diff) | |
parent | 736669e4a56e741c6bb5a235e4464b0de8640750 (diff) | |
download | android_system_bt-4a8fc7789e1d856cd042d502cac4832300d99b14.tar.gz android_system_bt-4a8fc7789e1d856cd042d502cac4832300d99b14.tar.bz2 android_system_bt-4a8fc7789e1d856cd042d502cac4832300d99b14.zip |
SDP: Disconnect when there is a bad length am: 7f555a1a9b am: 325d1539ba am: 23bcf92253
am: 736669e4a5
Change-Id: If70ce170d5aefa143635218cbe0ae922fffc3a01
-rw-r--r-- | stack/sdp/sdp_discovery.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/stack/sdp/sdp_discovery.cc b/stack/sdp/sdp_discovery.cc index 3dcdf2bfd..baadd7a47 100644 --- a/stack/sdp/sdp_discovery.cc +++ b/stack/sdp/sdp_discovery.cc @@ -657,6 +657,7 @@ static void process_service_search_attr_rsp(tCONN_CB* p_ccb, uint8_t* p_reply, p = sdpu_get_len_from_type(p, p + p_ccb->list_len, type, &seq_len); if (p == NULL || (p + seq_len) > (p + p_ccb->list_len)) { SDP_TRACE_WARNING("%s: bad length", __func__); + sdp_disconnect(p_ccb, SDP_ILLEGAL_PARAMETER); return; } p_end = &p_ccb->rsp_list[p_ccb->list_len]; |