diff --git a/core/src/main/java/com/orientechnologies/orient/core/storage/cache/local/doublewritelog/DoubleWriteLogGL.java b/core/src/main/java/com/orientechnologies/orient/core/storage/cache/local/doublewritelog/DoubleWriteLogGL.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/orientechnologies/orient/core/storage/cache/local/doublewritelog/DoubleWriteLogGL.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/storage/cache/local/doublewritelog/DoubleWriteLogGL.java
@@ -199,7 +199,8 @@ public class DoubleWriteLogGL implements DoubleWriteLog {
 
             containerBuffer.put(compressedBuffer);
             containerBuffer.putLong(xxHashPosition, XX_HASH
-                .hash(containerBuffer, xxHashPosition + XX_HASH_LEN, containerBuffer.position() - XX_HASH_LEN, XX_HASH_SEED));
+                .hash(containerBuffer, xxHashPosition + XX_HASH_LEN, containerBuffer.position() - xxHashPosition - XX_HASH_LEN,
+                    XX_HASH_SEED));
           } finally {
             ALLOCATOR.deallocate(compressedPointer);
           }
Out of bounds error was fixed in DWL