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

Commit 1c63b341 authored by Mark Wagner's avatar Mark Wagner Committed by Android (Google) Code Review
Browse files

Merge "check offset and don't crash"

parents e60f6730 60919953
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1564,6 +1564,10 @@ public class TextUtils {
     * {@link #CAP_MODE_SENTENCES}.
     */
    public static int getCapsMode(CharSequence cs, int off, int reqModes) {
        if (off < 0) {
            return 0;
        }

        int i;
        char c;
        int mode = 0;