assign value to uninitialized bt_addr field

This commit is contained in:
keymoon 2022-05-27 01:07:06 +09:00 committed by jincheng
parent 35fd2cee7c
commit 22cf1d0d58

View File

@ -2306,6 +2306,7 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
rem_name.length = 0;
rem_name.remote_bd_name[0] = 0;
}
memcpy(rem_name.bd_addr, p_inq->remname_bda, BD_ADDR_LEN);
/* Reset the remote BAD to zero and call callback if possible */
memset(p_inq->remname_bda, 0, BD_ADDR_LEN);