eth-sri / securify

[DEPRECATED] Security Scanner for Ethereum Smart Contracts
Apache License 2.0
215 stars 50 forks source link

Crash when not using default solc version #49

Closed f4z3r closed 5 years ago

f4z3r commented 5 years ago

https://github.com/eth-sri/securify/blob/97bbf703d379b3c33b5a2073320461cd380d834f/scripts/utils.py#L74-L79

When not matching the solc version using ^ in the pragma, the solc_version variable contains a _sre.SRE_Match object, but it is treated as a string. This causes several errors such as comparison to strings in line 78, and undeclared method calls (.split()) after the _sre.SRE_Match object is returned from the function.

To test this, you can actually just try to run the default example using:

docker run securify
f4z3r commented 5 years ago

Fixed with PR #53