Skip to content

Commit b15e18f

Browse files
committed
Fix buffer size to ensure
1 parent 7cd8f41 commit b15e18f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

msgpack-core/src/main/java/org/msgpack/core/MessageUnpacker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ public String unpackString() throws IOException {
965965
decodeBuffer.clear();
966966
StringBuilder sb = new StringBuilder();
967967
while(cursor < strLen) {
968-
if (!ensure(strLen))
968+
if (!ensure(strLen-cursor))
969969
throw new EOFException();
970970

971971
int readLen = Math.min(buffer.size() - position, strLen-cursor);

0 commit comments

Comments
 (0)