Skip to content

Commit 08d1ab8

Browse files
authored
Add files via upload
1 parent 9e3a21a commit 08d1ab8

29 files changed

+3077
-4045
lines changed

Diff for: abi-spec.rst

+53-189
Large diffs are not rendered by default.

Diff for: assembly.rst

+400-122
Large diffs are not rendered by default.

Diff for: bugs.json

-34
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
11
[
2-
{
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 ]"}
9-
},
10-
{
11-
"name": "EventStructWrongData",
12-
"summary": "Using structs in events logged wrong data.",
13-
"description": "If a struct is used in an event, the address of the struct is logged instead of the actual data.",
14-
"introduced": "0.4.17",
15-
"fixed": "0.4.25",
16-
"severity": "very low",
17-
"check": {"ast-compact-json-path": "$..[?(@.nodeType === 'EventDefinition')]..[?(@.nodeType === 'UserDefinedTypeName' && @.typeDescriptions.typeString.startsWith('struct'))]"}
18-
},
19-
{
20-
"name": "NestedArrayFunctionCallDecoder",
21-
"summary": "Calling functions that return multi-dimensional fixed-size arrays can result in memory corruption.",
22-
"description": "If Solidity code calls a function that returns a multi-dimensional fixed-size array, array elements are incorrectly interpreted as memory pointers and thus can cause memory corruption if the return values are accessed. Calling functions with multi-dimensional fixed-size arrays is unaffected as is returning fixed-size arrays from function calls. The regular expression only checks if such functions are present, not if they are called, which is required for the contract to be affected.",
23-
"introduced": "0.1.4",
24-
"fixed": "0.4.22",
25-
"severity": "medium",
26-
"check": {"regex-source": "returns[^;{]*\\[\\s*[^\\] \\t\\r\\n\\v\\f][^\\]]*\\]\\s*\\[\\s*[^\\] \\t\\r\\n\\v\\f][^\\]]*\\][^{;]*[;{]"}
27-
},
28-
{
29-
"name": "OneOfTwoConstructorsSkipped",
30-
"summary": "If a contract has both a new-style constructor (using the constructor keyword) and an old-style constructor (a function with the same name as the contract) at the same time, one of them will be ignored.",
31-
"description": "If a contract has both a new-style constructor (using the constructor keyword) and an old-style constructor (a function with the same name as the contract) at the same time, one of them will be ignored. There will be a compiler warning about the old-style constructor, so contracts only using new-style constructors are fine.",
32-
"introduced": "0.4.22",
33-
"fixed": "0.4.23",
34-
"severity": "very low"
35-
},
362
{
373
"name": "ZeroFunctionSelector",
384
"summary": "It is possible to craft the name of a function such that it is executed instead of the fallback function in very specific circumstances.",

Diff for: bugs.rst

-13
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,6 @@ conditions
5656
is an object that can contain a boolean value ``optimizer``, which
5757
means that the optimizer has to be switched on to enable the bug.
5858
If no conditions are given, assume that the bug is present.
59-
check
60-
This field contains different checks that report whether the smart contract
61-
contains the bug or not. The first type of check are Javascript regular
62-
expressions that are to be matched against the source code ("source-regex")
63-
if the bug is present. If there is no match, then the bug is very likely
64-
not present. If there is a match, the bug might be present. For improved
65-
accuracy, the checks should be applied to the source code after stripping
66-
comments.
67-
The second type of check are patterns to be checked on the compact AST of
68-
the Solidity program ("ast-compact-json-path"). The specified search query
69-
is a `JsonPath <https://github.com/json-path/JsonPath>`_ expression.
70-
If at least one path of the Solidity AST matches the query, the bug is
71-
likely present.
7259

7360
.. literalinclude:: bugs.json
7461
:language: js

0 commit comments

Comments
 (0)