diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-01 01:37:50 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-01 01:47:57 +0800 |
commit | d569ad91e466aa2fab17ed32a1412a1919ce49fd (patch) | |
tree | ee8e005b5e57f359fd075e2029432b47fe2d4634 | |
parent | d26b6b64c0a93648f40f9e97f4ffd3916946a948 (diff) | |
download | dexon-solidity-d569ad91e466aa2fab17ed32a1412a1919ce49fd.tar.gz dexon-solidity-d569ad91e466aa2fab17ed32a1412a1919ce49fd.tar.zst dexon-solidity-d569ad91e466aa2fab17ed32a1412a1919ce49fd.zip |
Restrict assembly tags to 32-bit
-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); } |