OSDN Git Service

Store a name string in property without violating string boundaries
authorPavlin Radoslavov <pavlin@google.com>
Sun, 19 Mar 2017 02:35:06 +0000 (19:35 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 6 Sep 2017 14:41:41 +0000 (14:41 +0000)
commit2a874660a97f31a9cde4625055cf61ab27308856
tree882e0c7dc8c5804c80f434cf825ed4ca1a17b3f0
parent7f1ee9db2d85c0a2df8894a3cf8da7f99d9733a4
Store a name string in property without violating string boundaries

Don't copy data beyond end of string when storing it as BT_PROPERTY_BDNAME
in property.
Also, update an unit test to create a string by considering the property
name length.

Test: Running unit tests with ASAN enabled
Change-Id: Iaa586b4a0942f99ba469d1ed963729e7ad721503
btcore/src/property.cc
test/suite/adapter/adapter_unittest.cc