Skip to content

Commit 23b0fd8

Browse files
frsyukikomamitsu
authored andcommitted
minimum required castBuffer size is 8 bytes
1 parent 634fdd8 commit 23b0fd8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,10 @@ public class MessageUnpacker
9898
private long totalReadBytes;
9999

100100
/**
101-
* Extra buffer for fixed-length data at the buffer boundary. At most 17-byte buffer (for FIXEXT16) is required.
101+
* Extra buffer for fixed-length data at the buffer boundary.
102+
* At most 8-byte buffer (for readLong used by uint 64 and UTF-8 character decoding) is required.
102103
*/
103-
private final MessageBuffer castBuffer = MessageBuffer.newBuffer(24);
104+
private final MessageBuffer castBuffer = MessageBuffer.newBuffer(8);
104105

105106
/**
106107
* Variable by ensureHeader method. Caller of the method should use this variable to read from returned MessageBuffer.

0 commit comments

Comments
 (0)