OSDN Git Service

HIDD: Check descriptor length and increase buffer
authorHansong Zhang <hsz@google.com>
Tue, 2 Oct 2018 23:26:38 +0000 (16:26 -0700)
committerandroid-build-team Robot <android-build-team-robot@google.com>
Sat, 20 Oct 2018 00:18:19 +0000 (00:18 +0000)
commit9009da96e00434501d9398bbfbc636902c757632
tree7cf98d5d64ccac04bda4e67547fd94d1a9c83d08
parent72aa93cbe72008b1d0486b3ab3e8c7faf01b45f6
HIDD: Check descriptor length and increase buffer

Since maximum descriptor length is 2048, we need to assign 2054 bytes of
buffer for another 6 bytes of data. Also added a const for maximum
descriptor length.

Bug: 113572366
Test: manual
Change-Id: Ie2b25c9e1a9f2019cbc7e6fbecbb08b643c87946
Merged-In: Ie2b25c9e1a9f2019cbc7e6fbecbb08b643c87946
(cherry picked from commit c0530b211e8a5b43e556c6d47d424b231afb8e99)
bta/hd/bta_hd_int.h
stack/hid/hidd_api.cc
stack/include/hiddefs.h