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

Commit 353600dc authored by sy.yun's avatar sy.yun Committed by Robert Greenwalt
Browse files

fix mvno_match_data OutOfBounds Exception in substring check routine.

When the length of mvno_match_data is greater than GID from IccRecord,
It will generate StringIndexOutOfBoundsException.
Therefore, codes are changed to use startsWith() insteads of subString().

Change-Id: I04c5c5039edb2cfa757bf2f5a4b9f124afb69b06
Bugs: 10171336
parent 7982f3e5
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -886,8 +886,7 @@ public final class DcTracker extends DcTrackerBase {
            }
        } else if (mvno_type.equalsIgnoreCase("gid")) {
            String gid1 = r.getGid1();
            if ((gid1 != null) && gid1.substring(0,
                    mvno_match_data.length()).equalsIgnoreCase(mvno_match_data)) {
            if ((gid1 != null) && gid1.startsWith(mvno_match_data)) {
                return true;
            }
        }