OSDN Git Service

Fix errors in handling RawAddresses
authorJack He <siyuanh@google.com>
Tue, 15 Aug 2017 06:02:16 +0000 (23:02 -0700)
committerJack He <siyuanh@google.com>
Tue, 15 Aug 2017 23:44:36 +0000 (16:44 -0700)
commit5f6ecfac764e2fd95fe266b2c25f9fafa4a4e405
treec1215d2c54af2849943676507e0a947d1be90bc0
parentaa77767edc76a09c1fb06a6c5873ae862d577ef9
Fix errors in handling RawAddresses

* In change I8d1bd6914aec55bb53495b1d0d5e3d37b86865e6
  memcmp(a, b, LEN) != 0 should be translated to
  A != B
* memcpy should not be applied to RawAddress objects.
  Assignment operator should be used instead.
* memset should not be applied to RawAddress objects.
  Assignment to RawAddress::kEmpty should be used.
* Fixed a crash in GATT

Bug: 64316340
Test: Unit test, pair with device and transmit
Change-Id: Iceefab821c1d45a88194d87a43a192afa5f263fd
(cherry picked from commit 882aec320e88b0860a3d53db828bb099c7ca2409)
btif/src/btif_av.cc
btif/src/btif_core.cc
btif/src/btif_profile_queue.cc
service/low_energy_client.h
stack/btm/btm_sec.cc
stack/gatt/gatt_sr.cc
stack/l2cap/l2c_api.cc
test/suite/rfcomm/rfcomm_unittest.cc