Skip to content

Commit

Permalink
patch: consumer mmap mode had an integer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunjeet committed Jan 17, 2025
1 parent 0444899 commit ac6ed6c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public byte getByte(long index) throws BufferUnderflowException {
*/
public long getLong(long startByteIndex) throws BufferUnderflowException {

int alignmentOffset = (int)(startByteIndex - this.position()) % Long.BYTES;
int alignmentOffset = (int)((startByteIndex - this.position()) % Long.BYTES);
long nextAlignedPos = startByteIndex - alignmentOffset + Long.BYTES;

byte[] bytes = new byte[Long.BYTES];
Expand Down

0 comments on commit ac6ed6c

Please sign in to comment.