Skip to content

Commit e65da3e

Browse files
committed
msgpack#104: Fix assertion condition
1 parent 952996e commit e65da3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

msgpack-core/src/main/java/org/msgpack/core/buffer/ArrayBufferInput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public ArrayBufferInput(byte[] arr) {
1818

1919
public ArrayBufferInput(byte[] arr, int offset, int length) {
2020
this.buffer = MessageBuffer.wrap(checkNotNull(arr, "input array is null")).slice(offset, length);
21-
checkArgument(length <= arr.length);
21+
checkArgument(offset + length <= arr.length);
2222
this.length = length;
2323
}
2424

0 commit comments

Comments
 (0)