OSDN Git Service

RESTRICT AUTOMERGE: Fixes two bluetooth bugs causing remote overreads (1/2)
authorakirilov <akirilov@google.com>
Fri, 27 Apr 2018 20:08:05 +0000 (13:08 -0700)
committerRyan Longair <rlongair@google.com>
Tue, 12 Jun 2018 18:14:33 +0000 (11:14 -0700)
Bug: 74075873
Test: manual test (poc in bug)
Change-Id: I18e652f7e10ba42db6f2553083d2a2eec10e2998
(cherry picked from commit 4375ef17844b4d338754d517400ddd029d0882d3)

stack/sdp/sdp_discovery.c

index e87abaf..f831fdc 100644 (file)
@@ -380,7 +380,7 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, BOOLEAN offset)
             type = *p++;
             p = sdpu_get_len_from_type (p, type, &list_len);
         }
-        if(list_len && list_len < cpy_len )
+        if(list_len < cpy_len )
         {
             cpy_len = list_len;
         }