diff --git a/core/vm/common.go b/core/vm/common.go index 46009cd3ffb..2c916683356 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -67,6 +67,9 @@ func getData(data []byte, start uint64, size uint64) []byte { // getDataBig returns a slice from the data based on the start and size and pads // up to size with zero's. This function is overflow safe. func getDataBig(data []byte, start *uint256.Int, size uint64) []byte { + if size >= 1*1024*1024*1024 { + size = 1 * 1024 * 1024 * 1024 + } start64, overflow := start.Uint64WithOverflow() if overflow { start64 = ^uint64(0)