summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2015-07-02 01:31:09 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-02 01:31:09 +0000
commitdc3d6af97d521678981c773ad9f4e1da088d7870 (patch)
tree917e44341b76e4a712ecaa379262a0e84561024d
parent9004e7f5516c5b4a1b4178fa6a8bb4b3ca4ddcd0 (diff)
parentbb686c25b214edadd1830abd056db2d570d716ff (diff)
downloadframeworks_native-dc3d6af97d521678981c773ad9f4e1da088d7870.zip
frameworks_native-dc3d6af97d521678981c773ad9f4e1da088d7870.tar.gz
frameworks_native-dc3d6af97d521678981c773ad9f4e1da088d7870.tar.bz2
am bb686c25: Disregard alleged binder entities beyond parcel bounds
* commit 'bb686c25b214edadd1830abd056db2d570d716ff': Disregard alleged binder entities beyond parcel bounds
-rw-r--r--libs/binder/Parcel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index e5a2871..0464e93 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -384,7 +384,7 @@ status_t Parcel::appendFrom(const Parcel *parcel, size_t offset, size_t len)
// Count objects in range
for (int i = 0; i < (int) size; i++) {
size_t off = objects[i];
- if ((off >= offset) && (off < offset + len)) {
+ if ((off >= offset) && (off + sizeof(flat_binder_object) <= offset + len)) {
if (firstIndex == -1) {
firstIndex = i;
}