commit | f37d1bd3d9053ee580c5ce51cfe0f3ceeae71cef | [log] [tgz] |
---|---|---|
author | Andy Hung <hunga@google.com> | Thu Jan 07 08:47:25 2021 -0800 |
committer | Andy Hung <hunga@google.com> | Fri Jan 08 13:48:05 2021 -0800 |
tree | 5ea9b5811861c1901f47bc76c2aca999fa97aa49 | |
parent | 048f1e93fd31849b1b9d9e9dc4293e630280caae [diff] |
Parcel: Add vector read size bounds check When reserving data for a vector read, limit the size against the number of available bytes in the Parcel. This is a mitigating solution to avoid corrupted Parcels from throwing std::badalloc exceptions in std::vector reserve/resize. Test: see bug and dups for details on issues Test: atest binderLibTest Test: atest binderParcelTest Bug: 131868573 Change-Id: I61b2fea6a481221214d1e7d8c85d8c197de355bc