OSDN Git Service

RESTRICT AUTOMERGE: Fixes two bluetooth bugs causing remote overreads (1/2)
authorakirilov <akirilov@google.com>
Mon, 21 May 2018 19:56:17 +0000 (12:56 -0700)
committerVasyl Gello <vasek.gello@gmail.com>
Wed, 8 Aug 2018 06:34:06 +0000 (09:34 +0300)
Bug: 74075873
Test: manual test (poc in bug)
Change-Id: I56e87cfdf8731acca00cefac98abb2ba06f6e7ed
(cherry picked from commit 3575ba8ca36dccf7dcdb2dbf16ed170d549911d3)

stack/sdp/sdp_discovery.c

index 7840a2b..e133978 100644 (file)
@@ -385,7 +385,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;
         }