OSDN Git Service

Fix buffer overflow in btif_dm_data_copy
authorJakub Pawlowski <jpawlowski@google.com>
Tue, 27 Nov 2018 16:59:57 +0000 (17:59 +0100)
committerJakub Pawlowski <jpawlowski@google.com>
Thu, 29 Nov 2018 11:51:31 +0000 (11:51 +0000)
commitd1179759041eb66baf1b5cd398d69ce58849d848
treec43acdbb3b450d31f7fe26efe3812bf3f0b41d06
parent78508d2c2cf93b4dd5c7aa630b90f5c6283fe53c
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.c
stack/smp/smp_utils.c