OSDN Git Service
(root)
/
android-x86
/
frameworks-native.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d6d291
)
libbinder: Fix out of bounds in readBoolVector
author
Christopher Wiley
<wiley@google.com>
Tue, 27 Oct 2015 23:33:47 +0000
(16:33 -0700)
committer
Christopher Wiley
<wiley@google.com>
Wed, 28 Oct 2015 00:42:32 +0000
(17:42 -0700)
Bug:
25012838
Test: This code now works at runtime.
Change-Id: I3d6b2677f11276e6be4c51451ca36572a4ee573d
libs/binder/Parcel.cpp
patch
|
blob
|
history
diff --git
a/libs/binder/Parcel.cpp
b/libs/binder/Parcel.cpp
index
70e41e3
..
48bf799
100644
(file)
--- a/
libs/binder/Parcel.cpp
+++ b/
libs/binder/Parcel.cpp
@@
-1487,8
+1487,8
@@
status_t Parcel::readBoolVector(std::vector<bool>* val) const {
/* C++ bool handling means a vector of bools isn't necessarily addressable
* (we might use individual bits)
*/
- for (int32_t i = 0; i < size; size++) {
- bool data;
+ bool data;
+ for (int32_t i = 0; i < size; ++i) {
status = readBool(&data);
(*val)[i] = data;