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>
Tue, 27 Nov 2018 21:31:20 +0000 (22:31 +0100)
commitb6d3e5b01da84bd765c980798728bba02e32b7dc
tree02c8ad259123d6dba0e8d82da955a44bfc807771
parent39d917c8a337cba5cb266d7654f910126a717ace
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
stack/smp/smp_act.cc
stack/smp/smp_utils.cc