libbinder: Fix out of bounds in readBoolVector
Bug: 25012838
Test: This code now works at runtime.
Change-Id: I3d6b2677f11276e6be4c51451ca36572a4ee573d
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 70e41e3..48bf799 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -1487,8 +1487,8 @@
/* 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;