Skip to content

Commit 9f6a12e

Browse files
committed
Update bug description, add regex and tests.
1 parent b84a1b3 commit 9f6a12e

File tree

3 files changed

+83
-48
lines changed

3 files changed

+83
-48
lines changed

docs/bugs.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
[
22
{
3-
"name": "ExpCleanupZero",
4-
"summary": "Using exponentiating with types shorter than 256 bits and zero as base can result in unexpected values.",
5-
"description": "As defined by the EVM, 0 ** 0 is one. Solidity does not always remove dirty higher order bits of types that are smaller than 256 bits before applying an operation because it does not matter if the cleanup is performed before or after the operation. This is true for EXP except for the case where the base is zero, which was overlooked.",
6-
"fixed": "0.5.0",
7-
"severity": "high"
3+
"name": "ExpExponentCleanup",
4+
"summary": "Using the ** operator with an exponent of type shorter than 256 bits can result in unexpected values.",
5+
"description": "Higher order bits in the exponent are not properly cleaned before the EXP opcode is applied if the type of the exponent expression is smaller than 256 bits and not smaller than the type of the base. In that case, the result might be larger than expected if the exponent is assumed to lie within the value range of the type. Literal numbers as exponents are unaffected as are exponents or bases of type uint256.",
6+
"fixed": "0.4.25",
7+
"severity": "medium/high",
8+
"check": {"regex-source": "[^/]\\*\\* *[^/0-9 ]"}
89
},
910
{
1011
"name": "EventStructWrongData",

0 commit comments

Comments
 (0)