crytic / crytic/slither

Bad references reported to incorrect contract

Open
#658 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

When running against the argent infrastructure contracts we get the following reports for `strings` library:

```
INFO:Detectors:
0: strings.ord(strings.slice) (wallet/BaseWallet.sol) performs a multiplication on the result of a division:
-b = word / divisor (wallet/BaseWallet.sol)
-ret = b (wallet/BaseWallet.sol)
-ret = (ret * 64) | (b & 0x3F) (wallet/BaseWallet.sol)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#divide-before-multiply
```
and
```
0: strings.len(bytes32).ret (wallet/BaseWallet.sol#87) is a local variable never initialized
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#uninitialized-local-variables
```

The references these point to however are not in the `strings` library contract but in `BaseWallet.sol` which does not import or use the library in any way.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.