am bb686c25: Disregard alleged binder entities beyond parcel bounds

* commit 'bb686c25b214edadd1830abd056db2d570d716ff':
  Disregard alleged binder entities beyond parcel bounds
This commit is contained in:
Christopher Tate 2015-07-02 01:31:09 +00:00 committed by Android Git Automerger
commit dc3d6af97d
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}