When the owner calls InheritanceManager::removeBeneficiary and deletes an address of a beneficiary, the slot of the deleted address becomes address(0) and the length of the array InheritanceManager::beneficiaries stays the same.
Having zero addresses in beneficiaries array could lead to serious issues in the InheritanceManager::withdrawInheritedFunds function. The function does not handle zero addresses because of which beneficiaries will receive less than expected funds.
When calling InheritanceManager::withdrawInheritedFunds, beneficiaries.length is used as a divisor, even if some slots are address(0). This causes funds being divided by an incorrect number. Real beneficiaries will receive less than expected and some funds will be send to address(0).
-manual analysis
Update InheritanceManager::withdrawInheritedFunds to check for address(0) and to use a correct divisor.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.