diff options
| author | 2016-11-15 17:01:46 -0800 | |
|---|---|---|
| committer | 2016-11-15 17:01:46 -0800 | |
| commit | 29dedec71a47f721c7bcc28bdd3e1737e40f6f70 (patch) | |
| tree | 8e978ede25635467edbfd370278efe46c2cfb2c8 | |
| parent | 1ff500569866920f44b73991b9755b10d49db713 (diff) | |
| parent | 70b9a03dc32789d371eccf47ccef00e044649e3a (diff) | |
resolve merge conflicts of 70b9a03 to nyc-mr2-dev-plus-aosp
Change-Id: If543d1c9f9ae22a2803e16d257531335b2995a96
| -rw-r--r-- | include/binder/Parcel.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h index 74e75d74fc..bd2213d926 100644 --- a/include/binder/Parcel.h +++ b/include/binder/Parcel.h @@ -681,8 +681,16 @@ status_t Parcel::unsafeReadTypedVector( return UNEXPECTED_NULL; } + if (val->max_size() < size) { + return NO_MEMORY; + } + val->resize(static_cast<size_t>(size)); + if (val->size() < size) { + return NO_MEMORY; + } + for (auto& v: *val) { status = (this->*read_func)(&v); |