BufferUnderflowException decoding length 6 UTF-8 sequences with direct buffers

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 7
    • Affects Version/s: 7
    • Component/s: core-libs
    • b27
    • generic
    • generic
    • Not verified

      Decoding the sequence
      fd 93 a8 8c b9
      with the charset UTF-8 with direct buffers gives

      java.nio.BufferUnderflowException
      at java.nio.Buffer.nextGetIndex(Buffer.java:492)
      at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:223)
      at sun.nio.cs.UTF_8$Decoder.decodeBufferLoop(UTF_8.java:339)
      at sun.nio.cs.UTF_8$Decoder.decodeLoop(UTF_8.java:378)
      at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:562)

            Assignee:
            Xueming Shen
            Reporter:
            Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: