OSDN Git Service

Fix buffer overflow in btif_dm_data_copy
authorJakub Pawlowski <jpawlowski@google.com>
Tue, 27 Nov 2018 17:22:22 +0000 (18:22 +0100)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 28 Nov 2018 22:03:08 +0000 (22:03 +0000)
commit64c6f33e7e3245f0bc2109001893704763a2ff79
tree4748ff91f2ec654ed731ad3fd8b467cebabb72ee
parent54f6c84dfd170985c6faad235c94bac6f6f690f3
Fix buffer overflow in btif_dm_data_copy

When we use a union, we should always define variables as the union type,
not as one of the field subtypes. If the latter is cast to the union type,
buffer overflow can happen.

Bug: 110166268
Test: compilation
Change-Id: I473c03b099ad5a326e7a3739f65efd33cf4775bd
Merged-In: I473c03b099ad5a326e7a3739f65efd33cf4775bd
stack/smp/smp_act.cc
stack/smp/smp_utils.cc