| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I found another bug; This part should use ensure(strLen-cursor): while(cursor < strLen) {
if (!ensure(strLen))
throw new EOFException();
|
Sorry, something went wrong.
There was a problem hiding this comment.
I think there is no guarantee that the read length from the input always matches Math.min(buffer.size() - position, strLen-cursor) when OVERFLOW (output buffer has insufficient space) happens. When OVERFLOW occurs, the input data might be partially read. That is why I compute readLen as bb.limit() - bb.remaining().
Sorry, something went wrong.
There was a problem hiding this comment.
Ah. I was wrong. readLen can be retrieved by bb.position() since we created a new ByteBuffer at
ByteBuffer bb = buffer.toByteBuffer(position, readLen);
whose initial position is 0.
Sorry, something went wrong.
|
Now I got it. I don't need to set readLen in while(bb.hasRamaining()) loop. Thanks |
Sorry, something went wrong.
Fix MessageUnpacker#unpackString in case that string length is more than...
| Back | FazBrowse Home | New Git URL |
I modified MessageUnpacker#unpackString to fix #209.
@xerial Can you review this change?