From 1f5c28d8336aa9ce7d0ce9b73bffdd4106c85d8e Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 7 Mar 2019 12:01:46 +0100 Subject: [PATCH] core/vm: fix error in memory calculation --- core/vm/common.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/vm/common.go b/core/vm/common.go index 63bb3a746c..b4179890da 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -28,7 +28,7 @@ import ( func calcMemSize64(off, l *big.Int) (uint64, bool) { // if length is zero, memsize is always zero, regardless of offset if l.Sign() == 0 { - return 0, true + return 0, false } // Check that neither offset nor length overflows if off.BitLen() > 64 || l.BitLen() > 64 { @@ -51,7 +51,7 @@ func calcMemSize64(off, l *big.Int) (uint64, bool) { func calcMemSize64WithUint(off *big.Int, length64 uint64) (uint64, bool) { // if length is zero, memsize is always zero, regardless of offset if length64 == 0 { - return 0, true + return 0, false } // Check that offset doesn't overflow if off.BitLen() > 64 {