OSDN Git Service
(root)
/
android-x86
/
frameworks-native.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
1ff5005
70b9a03
)
resolve merge conflicts of 70b9a03 to nyc-mr2-dev-plus-aosp
author
Casey Dahlin
<sadmac@google.com>
Wed, 16 Nov 2016 01:01:46 +0000
(17:01 -0800)
committer
Casey Dahlin
<sadmac@google.com>
Wed, 16 Nov 2016 01:01:46 +0000
(17:01 -0800)
Change-Id: If543d1c9f9ae22a2803e16d257531335b2995a96
1
2
include/binder/Parcel.h
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
include/binder/Parcel.h
index
74e75d7
,
2490b82
..
bd2213d
---
1
/
include/binder/Parcel.h
---
2
/
include/binder/Parcel.h
+++ b/
include/binder/Parcel.h
@@@
-681,8
-589,16
+681,16
@@@
status_t Parcel::unsafeReadTypedVector
return UNEXPECTED_NULL;
}
- val->resize(size);
+ 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);