changeset 194:d64b14c25c82

6636363: BufferUnderflowException decoding length 6 UTF-8 sequences with direct buffers Reviewed-by: sherman
author martin
date Sat, 10 May 2008 11:30:53 -0700
parents a3b3f07682b5
children 3e7a4b6ef105
files src/share/classes/sun/nio/cs/UTF_8.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/nio/cs/UTF_8.java	Thu May 08 09:16:03 2008 -0400
+++ b/src/share/classes/sun/nio/cs/UTF_8.java	Sat May 10 11:30:53 2008 -0700
@@ -326,7 +326,7 @@
 
                         case 12: case 13:
                             // 6 bytes, 31 bits
-                            if (src.remaining() < 4)
+                            if (src.remaining() < 5)
                                 return CoderResult.UNDERFLOW;
                             if (!isContinuation(b2 = src.get()))
                                 return CoderResult.malformedForLength(1);