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>
Thu, 18 Feb 2016 18:38:46 +0000 (10:38 -0800)
commitbe4ae78ad94311389227b1788cf11d36c81d6d22
tree28abbfda812c2c2f2fbe0317e96a928ceb0f0126
parent4bdc3535a788dc708a1b6c364abf1ee594087494
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