OSDN Git Service

Use the correct tBTA_PAN type when copying the data in a callback
authorPavlin Radoslavov <pavlin@google.com>
Fri, 17 Mar 2017 01:54:55 +0000 (18:54 -0700)
committerPavlin Radoslavov <pavlin@google.com>
Fri, 17 Mar 2017 01:54:55 +0000 (18:54 -0700)
commitcf036139cc01bd0c79897087f5c1e995e92937d6
treeeab559828ec240ceadebdfb169dc4ff57361c2d0
parent16da9217c6e44e7b9bbe3a6c60c1e293d52c7223
Use the correct tBTA_PAN type when copying the data in a callback

This fixes stack-buffer-overflow issue found using ASAN.
Previously, the original data had type "struct tBTA_PAN_SET_ROLE"
and similar, and eventually "memcpy(..., sizeof(tBTA_PAN))" would
copy data beyond the end of the data buffer.

Bug: 36367964
Test: Running ASAN build
Change-Id: I47210a501378023168a0dd71381e93a5051a4c71
bta/pan/bta_pan_act.cc
bta/pan/bta_pan_main.cc