OSDN Git Service

DO NOT MERGE 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)
committerRyan Longair <rlongair@google.com>
Thu, 18 Jan 2018 00:51:50 +0000 (16:51 -0800)
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
Merged-In: I55ec6d8b53e5987cd7721e0ae3ffccc11d6638a0
Change-Id: I55ec6d8b53e5987cd7721e0ae3ffccc11d6638a0
(cherry picked from commit 11cd7277a1d0da9013a8381cddbfc096e9adaed6)
(cherry picked from commit c779dc72e098a65fea6774d7ffdd036086ef7cd2)

stack/smp/smp_utils.c

index a7357db..675cb42 100644 (file)
@@ -297,8 +297,7 @@ BOOLEAN  smp_send_msg_to_L2CAP(BD_ADDR rem_bda, BT_HDR *p_toL2CAP)
     if ((l2cap_ret = L2CA_SendFixedChnlData (fixed_cid, rem_bda, p_toL2CAP)) == L2CAP_DW_FAILED)
     {
         smp_cb.total_tx_unacked -= 1;
-        SMP_TRACE_ERROR("SMP   failed to pass msg:0x%0x to L2CAP",
-                         *((UINT8 *)(p_toL2CAP + 1) + p_toL2CAP->offset));
+        SMP_TRACE_ERROR("SMP failed to pass msg to L2CAP");
         return FALSE;
     }
     else