Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00733989 authored by Pulkit Bhuwalka's avatar Pulkit Bhuwalka
Browse files

Fix SIGBUS error in BT stack when pairing with ARM boards

This CL fixes the actual crash location on pairing within the code.
https://android-review.googlesource.com/#/c/338167/ fixed the macro.

Bug:35154933
Test: Verified by building and pairing with RPI3/NXP Arm boards.

Change-Id: Ic35f446e53aa724ecab72801b7f89c70fd11ba62
parent 631d25b4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
 ******************************************************************************/

#include <string.h>
#include "btif_common.h"
#include "device/include/interop.h"
#include "include/bt_target.h"
#include "stack/btm/btm_int.h"
@@ -979,7 +980,8 @@ void smp_proc_srk_info(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {

  /* save CSRK to security record */
  le_key.sec_level = p_cb->sec_level;
  memcpy(le_key.csrk, p_data, BT_OCTET16_LEN); /* get peer CSRK */
  maybe_non_aligned_memcpy(le_key.csrk, p_data,
                           BT_OCTET16_LEN);    /* get peer CSRK */
  le_key.counter = 0;                          /* initialize the peer counter */

  if ((p_cb->peer_auth_req & SMP_AUTH_BOND) &&