am eba7afcc: am 2f340be3: Disregard alleged binder entities beyond parcel bounds

* commit 'eba7afcc14f55e7fd32db9254f2b186108e1c776':
  Disregard alleged binder entities beyond parcel bounds
This commit is contained in:
Christopher Tate 2015-07-02 01:41:09 +00:00 committed by Android Git Automerger
commit 708b42e0ee

View File

@ -411,7 +411,7 @@ status_t Parcel::appendFrom(const Parcel *parcel, size_t offset, size_t len)
// Count objects in range // Count objects in range
for (int i = 0; i < (int) size; i++) { for (int i = 0; i < (int) size; i++) {
size_t off = objects[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) { if (firstIndex == -1) {
firstIndex = i; firstIndex = i;
} }