diff options
author | chriseth <chris@ethereum.org> | 2018-05-02 23:34:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-02 23:34:13 +0800 |
commit | e681f4ee7924ebc419e0bd878b8640c63b17a0c8 (patch) | |
tree | 471a4ab5870c3d0c6dc4149eb0a83f7d02186b3f /libevmasm | |
parent | a856135bbf709d17732ce610e086c2300783b0a9 (diff) | |
parent | d569ad91e466aa2fab17ed32a1412a1919ce49fd (diff) | |
download | dexon-solidity-e681f4ee7924ebc419e0bd878b8640c63b17a0c8.tar.gz dexon-solidity-e681f4ee7924ebc419e0bd878b8640c63b17a0c8.tar.zst dexon-solidity-e681f4ee7924ebc419e0bd878b8640c63b17a0c8.zip |
Merge pull request #4028 from ethereum/asm-tags-32bit
Restrict assembly tags to 32-bit
Diffstat (limited to 'libevmasm')
-rw-r--r-- | libevmasm/Assembly.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libevmasm/Assembly.h b/libevmasm/Assembly.h index 367c6daa..1ed9b859 100644 --- a/libevmasm/Assembly.h +++ b/libevmasm/Assembly.h @@ -47,8 +47,8 @@ class Assembly public: Assembly() {} - AssemblyItem newTag() { return AssemblyItem(Tag, m_usedTags++); } - AssemblyItem newPushTag() { return AssemblyItem(PushTag, m_usedTags++); } + AssemblyItem newTag() { assertThrow(m_usedTags < 0xffffffff, AssemblyException, ""); return AssemblyItem(Tag, m_usedTags++); } + AssemblyItem newPushTag() { assertThrow(m_usedTags < 0xffffffff, AssemblyException, ""); return AssemblyItem(PushTag, m_usedTags++); } /// Returns a tag identified by the given name. Creates it if it does not yet exist. AssemblyItem namedTag(std::string const& _name); AssemblyItem newData(bytes const& _data) { h256 h(dev::keccak256(asString(_data))); m_data[h] = _data; return AssemblyItem(PushData, h); } |