From e866cedc40b0e61c0201aa5b3b48fd71b8e0fef7 Mon Sep 17 00:00:00 2001 From: Christoph Jentzsch Date: Wed, 19 Nov 2014 15:20:43 +0100 Subject: [PATCH] Fix memNeed overflow --- libevm/VM.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libevm/VM.h b/libevm/VM.h index 487c8cd1a..16df0af64 100644 --- a/libevm/VM.h +++ b/libevm/VM.h @@ -92,7 +92,7 @@ private: // INLINE: template dev::bytesConstRef dev::eth::VM::go(Ext& _ext, OnOpFunc const& _onOp, uint64_t _steps) { - auto memNeed = [](dev::u256 _offset, dev::u256 _size) { return _size ? _offset + _size : 0; }; + auto memNeed = [](dev::u256 _offset, dev::u256 _size) { return _size ? (bigint)_offset + _size : (bigint)0; }; if (m_jumpDests.empty()) {