Bug 989976 - [bluedroid] Hit SIGBUS on unaligned access while doing AdapterPropertiesChangeCallback. r=echou

This commit is contained in:
Shawn Huang 2014-06-17 01:38:00 -04:00
parent f47112f5df
commit d881e1b563

View File

@ -341,7 +341,9 @@ AdapterPropertiesCallback(bt_status_t aStatus, int aNumProperties,
InfallibleTArray<BluetoothNamedValue> props;
for (int i = 0; i < aNumProperties; i++) {
bt_property_t p = aProperties[i];
bt_property_t p;
// See Bug 989976, consider aProperties address is not aligned
memcpy(&p, &aProperties[i], sizeof(p));
if (p.type == BT_PROPERTY_BDADDR) {
BdAddressTypeToString((bt_bdaddr_t*)p.val, sAdapterBdAddress);