Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Invalid

Missing zero address checks in some function (Inheritancemanager.sol)

Summary:

Hi,

I found out a potential vulnerability in the contract 'Inheritancemanager.sol' in which some important functions don't verify out zero address check which can lead to fund loss.

Vulnerability Details:

The key details of this potential vulnerability can be given as follows:

In some functions like addBeneficiary, sendERC20, sendETH, contractInteractions of the contract don't check zero address in parameters: _beneficiary, _to, _targetwhich can eventually leads to token loss in the contract.

Impact:

This potential bug can cause accidental fund loss or burning amount by sending tokens to address(0).

Tools Used:

Manual Code Analysis + VS Code

Recommendations:

Add zero checks for all address parameters. For example for function **'sendERC20' **:

function sendERC20(address _tokenAddress, uint256 _amount, address _to) external nonReentrant onlyOwner {
require(_to != address(0), "Invalid recipient address");
require(_tokenAddress != address(0), "Invalid token address");
if (IERC20(_tokenAddress).balanceOf(address(this)) < _amount) {
revert InsufficientBalance();
}
IERC20(_tokenAddress).safeTransfer(_to, _amount);
_setDeadline();
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.