Fix loop iteration bug.
This patch fixes a loop iteration bug in the capabilities calculation code of the Zygote. This bug was introduced in aosp/804219. Bug: 124268515 Test: Built Change-Id: Ic4e3e736c0aa0e2ecaed87ca6f12367be41715f3
This commit is contained in:
@@ -1115,8 +1115,8 @@ static jlong CalculateCapabilities(JNIEnv* env, jint uid, jint gid, jintArray gi
|
||||
RuntimeAbort(env, __LINE__, "Bad gids array");
|
||||
}
|
||||
|
||||
for (int gid_index = gids_num; --gids_num >= 0;) {
|
||||
if (native_gid_proxy[gid_index] == AID_WAKELOCK) {
|
||||
for (int gids_index = 0; gids_index < gids_num; ++gids_index) {
|
||||
if (native_gid_proxy[gids_index] == AID_WAKELOCK) {
|
||||
gid_wakelock_found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user