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

Commit 597a990e authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Fix range check when encoding FPLMNs

Bug: 353979854
Test: atest CtsTelephonyTestCases:android.telephony.cts.TelephonyManagerTest
Flag: EXEMPT bugfix
Change-Id: Ic79c442e08a0c89809e92ad710a3a2ffde7ef46d
parent 808b8d14
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -967,7 +967,7 @@ public class IccUtils {
        byte[] serializedFplmns = new byte[dataLength];
        int offset = 0;
        for (String fplmn : fplmns) {
            if (offset >= dataLength) break;
            if (offset + FPLMN_BYTE_SIZE > dataLength) break;
            stringToBcdPlmn(fplmn, serializedFplmns, offset);
            offset += FPLMN_BYTE_SIZE;
        }