diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java index 275c750eb0a..72b1c1c7311 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAccess.java @@ -100,7 +100,7 @@ public final class UnsafeAccess { private static void unsafeCopy(Object src, long srcAddr, Object dst, long destAddr, long len) { while (len > 0) { long size = (len > UNSAFE_COPY_THRESHOLD) ? UNSAFE_COPY_THRESHOLD : len; - theUnsafe.copyMemory(src, srcAddr, dst, destAddr, len); + theUnsafe.copyMemory(src, srcAddr, dst, destAddr, size); len -= size; srcAddr += size; destAddr += size;