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:51:45 +0000 (14:51 -0800)
commitcae7c5ed437c4c3eae861b472aca3a1d24d3989a
tree5db486e32265a2992afdd0e60688206882e1da85
parent34054c7d17d13ee5417325e7d73f77d4514a9d13
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 64c6f33e7e3245f0bc2109001893704763a2ff79)
stack/smp/smp_act.cc
stack/smp/smp_utils.cc