OSDN Git Service

Copy an AVRC packet before sending a response back
authorPavlin Radoslavov <pavlin@google.com>
Fri, 26 Jun 2015 21:44:12 +0000 (14:44 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Sat, 27 Jun 2015 02:59:23 +0000 (19:59 -0700)
commit3a2fa83dac1b07b661a20e2412aad9bf81492106
treeac5c7c892c3931f77756575c23406707ec72f865
parentdd2021c65b8a1a14e67e4f23628b3e15faf9fdcc
Copy an AVRC packet before sending a response back

Don't reuse AVRC buffers for responding back. Apparently,
in the AVRC packets we transmit the offset with the payload must
be at least 15 octets. If the original buffer is not large enough,
this results in memory corruption.

Also, use an explicit check for 'bt_rc_ctrl_callbacks' as a workaround
until the upper layer does the right thing with the callbacks registration.

Bug: 22006014

Change-Id: I28c248d1580bdddbda76298d19faadf8985187fc
btif/src/btif_rc.c
stack/avrc/avrc_api.c