SmartContractSecurity / SWC-registry

Smart Contract Weakness Classification and Test Cases
https://swcregistry.io/
MIT License
852 stars 167 forks source link

Adding the new SWC-137 weakness related to shadowed_memory_variables #269

Closed mojtaba-eshghie closed 1 year ago

mojtaba-eshghie commented 2 years ago

I added SWC-137 related to the shadowing of local variables of the function (memory variables) by the named return variables. This very probable weakness is also reported wrongly by the compiler as shadowed named return variable not the variable declared inside function which makes it even more misleading. https://github.com/mojtaba-eshghie/SWC-registry/commit/4d5defa2f995a40683e24a8eb6a1522474f87136

chaals commented 1 year ago

@mojtaba-eshghie we are not reviewing new weaknesses - this repository is not maintained (has not been for a couple of years).

I believe that this issue is covered by https://entethalliance.org/specs/ethtrust-sl/#req-1-inheritance-conflict (along with it's overriding requirement as necessary) in the EthTrust spec.

I'd be very grateful if you can check that and let us know if you think it is properly covered.