OSDN Git Service

Abort parsing in case of format error
authorSatish Kodishala <skodisha@codeaurora.org>
Thu, 11 Feb 2016 14:32:08 +0000 (20:02 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 25 Mar 2016 20:20:54 +0000 (13:20 -0700)
commit52313661a3564b5fbaa7b4ad5d329724a03754fe
tree6e5357436d2910e1fbe78673200f51ae8db1ab01
parent2a6246f85c515f33eb4f9ff708f50680b1cb1653
Abort parsing in case of format error

Usecase:
1. Enable hf client and connect to AG.
2. Send +COPS with length more than allowed 16 characters.

Failure:
Crash might be seen while parsing +COPS response from AG.

Root cause:
sscanf used for parsing the AT commands does not update
the characters scanned when there is format error.

Fix:
Abort the processing in case of format error.

Bug: 27852645
Change-Id: Id3ca80712df3d0251cf9ffb04d9c766be809ae84
bta/hf_client/bta_hf_client_at.c