From 24af275480bbb7b6623b4ac41dbf0238cf2539e2 Mon Sep 17 00:00:00 2001 From: Sunjeet Date: Fri, 17 Jan 2025 06:04:58 -0800 Subject: [PATCH] patch: consumer mmap mode had an integer overflow (#714) --- .../com/netflix/hollow/core/memory/encoding/BlobByteBuffer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hollow/src/main/java/com/netflix/hollow/core/memory/encoding/BlobByteBuffer.java b/hollow/src/main/java/com/netflix/hollow/core/memory/encoding/BlobByteBuffer.java index 3c2ded474c..df988600de 100644 --- a/hollow/src/main/java/com/netflix/hollow/core/memory/encoding/BlobByteBuffer.java +++ b/hollow/src/main/java/com/netflix/hollow/core/memory/encoding/BlobByteBuffer.java @@ -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];