OSDN Git Service

Fix the processing of AVRCP Rcvd Pass Through messages
authorPavlin Radoslavov <pavlin@google.com>
Tue, 2 Feb 2016 18:31:44 +0000 (10:31 -0800)
committerPavlin Radoslavov <pavlin@google.com>
Thu, 4 Feb 2016 03:34:07 +0000 (03:34 +0000)
commitf94e67c2d96d25f221e0503f334f4a0a277bc68c
tree731ea439c445b122c1e7175cf16572324421d1c6
parent5f0e23d532f4f90d081ccc0e294f404eb5e5b688
Fix the processing of AVRCP Rcvd Pass Through messages

The assignment and handling of the optional tAVRC_MSG_PASS.p_pass_data
data buffer pointer was inconsistent:
 - For originating AVRCP packets, it was assigned to osi_getbuf()
   allocated memory.
 - For received AVRCP packets, it was a pointer in the middle of the
   received data buffer.
However, in the common function avrc_pass_msg(), the p_pass_data pointer
was deallocated by osi_freebuf(). This triggered an assert when processing
AVRCP Rcvd Pass Through messages with non-zero Data Length field.

Bug: 26865159
Change-Id: I1b2eb6713636c290caca16e77226c114d99dcb8e
bta/av/bta_av_api.c
btif/src/btif_rc.c
stack/avrc/avrc_api.c