OSDN Git Service

HFP: Fix out of bound access in phone number processing
authorHansong Zhang <hsz@google.com>
Wed, 27 Jun 2018 21:21:40 +0000 (14:21 -0700)
committerJP Sugarbroad <jpsugar@google.com>
Thu, 2 Aug 2018 00:33:50 +0000 (17:33 -0700)
commit24128cb42850105ccf427c933b6bd2f135c40d36
tree3a7f62f626a8a82365bf2a93ec1ae1b932661da2
parent21ec5121585abaa8479b46ff37b91041fc554c1e
HFP: Fix out of bound access in phone number processing

* Write at most sizeof(dialnum) chars into dialnum array in ClccResponse
  method
* Write at most sizeof(ag_res.str) - 5 chars into ag_res.str array in
  PhoneStateChange method

Bug: 79431031
Bug: 79266386
Test: make call with super long phone numbers
Change-Id: I98e7687ac4055800aa46626c6b1c866e52e474df
(cherry picked from commit 5c0888d42d9aa29dbecd77d3443fa066cdb4e13d)
btif/src/btif_hf.cc