OSDN Git Service

HFP: Fix out of bound access in phone number processing
authorHansong Zhang <hsz@google.com>
Wed, 27 Jun 2018 21:26:40 +0000 (14:26 -0700)
committerandroid-build-team Robot <android-build-team-robot@google.com>
Fri, 3 Aug 2018 19:17:34 +0000 (19:17 +0000)
commit6c69b511c528d038acd1cba1c92435407d5e0dc3
treed88910145173e2217fd9c7d18e285f592df10b0a
parentdcb565654613787a29a4c9a0551def30a43b2910
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
Merged-In: I98e7687ac4055800aa46626c6b1c866e52e474df
(cherry picked from commit 820b4327b1359fb1b389e07fc0f8c5e1304a7bfa)
btif/src/btif_hf.cc