We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cc58bb commit 1a26137Copy full SHA for 1a26137
src/main/java/com/maxmind/db/MultiBuffer.java
@@ -155,7 +155,7 @@ public byte get() {
155
/** {@inheritDoc} */
156
@Override
157
public Buffer get(byte[] dst) {
158
- if (position + dst.length > limit) {
+ if (position > limit - dst.length) {
159
throw new IndexOutOfBoundsException(
160
"Read exceeds limit: position=" + position
161
+ ", length=" + dst.length
@@ -359,4 +359,4 @@ public static MultiBuffer mapFromChannel(FileChannel channel) throws IOException
359
}
360
return new MultiBuffer(buffers, DEFAULT_CHUNK_SIZE);
361
362
-}
+}
0 commit comments