From: Stanley Tng Date: Wed, 10 Jan 2018 21:13:15 +0000 (-0800) Subject: Remove memory reference to invalid mem in error log X-Git-Tag: android-x86-9.0-r1~150^2^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=11cd7277a1d0da9013a8381cddbfc096e9adaed6;hp=f4e4684b773c0987c19d8e2fc03b8511713b79c2;p=android-x86%2Fsystem-bt.git Remove memory reference to invalid mem in error log Remove the memory reference to an invalid memory inside an error log message. Test: Edit code to force the error condition and make sure the new error log does not crashed. Bug: 67058064 Change-Id: I55ec6d8b53e5987cd7721e0ae3ffccc11d6638a0 --- diff --git a/stack/smp/smp_utils.cc b/stack/smp/smp_utils.cc index 6a0e35643..1d35bf25c 100644 --- a/stack/smp/smp_utils.cc +++ b/stack/smp/smp_utils.cc @@ -315,8 +315,7 @@ bool smp_send_msg_to_L2CAP(const RawAddress& rem_bda, BT_HDR* p_toL2CAP) { l2cap_ret = L2CA_SendFixedChnlData(fixed_cid, rem_bda, p_toL2CAP); if (l2cap_ret == L2CAP_DW_FAILED) { smp_cb.total_tx_unacked -= 1; - SMP_TRACE_ERROR("SMP failed to pass msg:0x%0x to L2CAP", - *((uint8_t*)(p_toL2CAP + 1) + p_toL2CAP->offset)); + SMP_TRACE_ERROR("SMP failed to pass msg to L2CAP"); return false; } else return true;