OSDN Git Service

Remove memory reference to invalid mem in error log
authorStanley Tng <stng@google.com>
Wed, 10 Jan 2018 21:13:15 +0000 (13:13 -0800)
committerMyles Watson <mylesgw@google.com>
Wed, 10 Jan 2018 23:55:57 +0000 (23:55 +0000)
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

stack/smp/smp_utils.cc

index 6a0e356..1d35bf2 100644 (file)
@@ -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;