<i18n dev> [12] RFR: 8193444: SimpleDateFormat throws ArrayIndexOutOfBoundsException when format contains long sequences of unicode characters

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

<i18n dev> [12] RFR: 8193444: SimpleDateFormat throws ArrayIndexOutOfBoundsException when format contains long sequences of unicode characters

Nishit Jain
Hi,

Please review the fix for JDK-8193444

Bug: https://bugs.openjdk.java.net/browse/JDK-8193444
Webrev: http://cr.openjdk.java.net/~nishjain/8193444/webrev.02/

Cause: If a format pattern contains a sequence of over 256 non-ASCII
unicode characters, the length field overflows as it is stored as 8-bit.
Fix: The handling of long_length (> 254) for non-ASCII unicode
characters is missing in the compilation phase of the format pattern,
added that in the fix.

Regards,
Nishit Jain
Reply | Threaded
Open this post in threaded view
|

Re: <i18n dev> [12] RFR: 8193444: SimpleDateFormat throws ArrayIndexOutOfBoundsException when format contains long sequences of unicode characters

naoto.sato
Looks good to me.

Naoto

On 7/12/18 1:26 AM, Nishit Jain wrote:

> Hi,
>
> Please review the fix for JDK-8193444
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8193444
> Webrev: http://cr.openjdk.java.net/~nishjain/8193444/webrev.02/
>
> Cause: If a format pattern contains a sequence of over 256 non-ASCII
> unicode characters, the length field overflows as it is stored as 8-bit.
> Fix: The handling of long_length (> 254) for non-ASCII unicode
> characters is missing in the compilation phase of the format pattern,
> added that in the fix.
>
> Regards,
> Nishit Jain