Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PDB-02S] Inexistent Sanitization of Input Address #859

Closed
zajck opened this issue Jan 8, 2024 · 0 comments · Fixed by #876
Closed

[PDB-02S] Inexistent Sanitization of Input Address #859

zajck opened this issue Jan 8, 2024 · 0 comments · Fixed by #876
Assignees
Labels

Comments

@zajck
Copy link
Member

zajck commented Jan 8, 2024

PDB-02S: Inexistent Sanitization of Input Address

Type Severity Location
Input Sanitization PriceDiscoveryBase.sol:L39-L42

Description:

The linked function accepts an address argument yet does not properly sanitize it.

Impact:

The presence of zero-value addresses, especially in constructor implementations, can cause the contract to be permanently inoperable. These checks are advised as zero-value inputs are a common side-effect of off-chain software related bugs.

Example:

constructor(address _wNative, uint256 _firstExchangeId2_2_0) {
    wNative = IWrappedNative(_wNative);
    EXCHANGE_ID_2_2_0 = _firstExchangeId2_2_0;
}

Recommendation:

We advise some basic sanitization to be put in place by ensuring that the address specified is non-zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant