Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a531ab0 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Improve app index validation

Bug: 310710841
Test: build & boot aosp_cf_x86_phone-eng
Change-Id: Iebb97286fd94a523962ba2d5cfeaa23c7f50b452
parent 25f90796
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1290,6 +1290,11 @@ public class UiccProfile extends IccCard {
            return -1;
        }

        if (mUiccApplications[index] == null) {
            loge("App index " + index + " is invalid");
            return -1;
        }

        if (mUiccApplications[index].getType() != expectedAppType
                && mUiccApplications[index].getType() != altExpectedAppType) {
            loge("App index " + index + " is invalid since it's not "