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

Commit 206ce622 authored by Kenny Root's avatar Kenny Root Committed by Android (Google) Code Review
Browse files

Merge "Fix off-by-one in parse3339 timezone check"

parents e421195d 412dc7de
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -584,9 +584,9 @@ static jboolean android_text_format_Time_parse3339(JNIEnv* env,
            inUtc = true;

	    if (offset != 0) {
	        if (len < tz_index + 5) {
	        if (len < tz_index + 6) {
	            char msg[100];
	            sprintf(msg, "Unexpected length; should be %d characters", tz_index + 5);
	            sprintf(msg, "Unexpected length; should be %d characters", tz_index + 6);
	            jniThrowException(env, "android/util/TimeFormatException", msg);
	            return false;
	        }