Hi,

Please help review the fix for JDK-8039751.

Issue:     https://bugs.openjdk.java.net/browse/JDK-8039751
webrev:  http://cr.openjdk.java.net/~sherman/8039751/webrev/


This is the corner case (in 4 bytes sequence) we missed when fixing 7096080 [1].
The UTF_8 decoder correctly returns the malformed length for some malformed
4-byte illegal byte sequence (via Decoder.malformedN(...)), but it fails to do 
so if
there is no enough (< 4 bytes) bytes in input buffer (via isMalfromed4_2(...))

The proposed change fixes these corner cases.

Hey Mark, my reading of tomcat's test case suggests "malformed 4-byte sequence"
is the only thing left after the jdk8 fix, right?

Thanks!
-Sherman

[1] https://bugs.openjdk.java.net/browse/JDK-7096080

Reply via email to