OSDN Git Service

binder: fix possible stack corruption
authorMarie Janssen <jamuraa@google.com>
Wed, 3 Feb 2016 02:51:52 +0000 (18:51 -0800)
committerAndre Eisenbach <eisenbach@google.com>
Wed, 10 Feb 2016 19:35:39 +0000 (19:35 +0000)
commit2fdc1a1f90d36cf7f421d5c2600d6596a0c4938d
treee0ffddb2a4203be25fca57641277606d6811a4b1
parent77f579f8258ffe6c31c987e9b2d018c853f2af88
binder: fix possible stack corruption

The stack could be corrupted by crafting a IPC call in interesting ways
when a character buffer was passed.

This patch also removes code duplication where these would occur.

Bug: 26917241
Change-Id: Ib6c149a293abf01f31c69a94c8f6dd91d8a2fff2
service/common/bluetooth/binder/IBluetoothGattServer.cpp
service/common/bluetooth/binder/IBluetoothGattServerCallback.cpp
service/common/bluetooth/binder/parcel_helpers.cpp
service/common/bluetooth/binder/parcel_helpers.h
service/test/parcel_helpers_unittest.cpp