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)
committerJP Sugarbroad <jpsugar@google.com>
Thu, 10 Jan 2019 22:54:54 +0000 (14:54 -0800)
commit1ffc00175a97067dbe0b189b82fe07b6f9cd6533
treee4e355711a4d70c9281648576de72ddb3d92b754
parent31e987d89039c94f2ccceb9dc37cc4358b4b6b5b
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
(cherry picked from commit ea90417d9965aec1c475418ca8f8f305af12de2d)
stack/smp/smp_act.cc
stack/smp/smp_utils.cc