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

b0g0_ctf - .call() in function withdraw(uint256) with whitespace payload #31

Open
Viktor-Andreev4 opened this issue Aug 12, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@Viktor-Andreev4
Copy link

Description of bug

The call function in the withdraw method includes a payload consisting of whitespace. This unintended whitespace can potentially lead to unexpected behavior during execution.

Impact

The inclusion of whitespace in the payload may cause unintended consequences or failures when interacting with the recipient's fallback function. This could result in improper handling of the Ether transfer and potentially lead to bugs or vulnerabilities.

Solution

Change (bool success, ) = msg.sender.call{value: depositRequired}(" "); to (bool success, ) = msg.sender.call{value: depositRequired}("");

@Viktor-Andreev4 Viktor-Andreev4 changed the title b0g0_ctf - .call in function withdraw(uint256) b0g0_ctf - .call() in function withdraw(uint256) with whitespace payload Aug 12, 2024
@BogoCvetkov
Copy link
Collaborator

Valid! But another auditor submitted first -> #30

@BogoCvetkov BogoCvetkov added the duplicate This issue or pull request already exists label Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants