Description: In InheritanceManager:removeBeneficiary, delete beneficiaries[indexToRemove] will set beneficiaries[indexToRemove] to address(0),
but the array length will not be reduced. when other functions (buyOutEstateNFT, withdrawInheritedFunds) loop through the
beneficiaries array, it will transfer assets to address(0), which will revert the transaction.
Impact: This issue disrupts the contract's functionality, causing it to always revert if the owner removed a beneficiary before.
Proof of Concept: Add the following test and run it
Recommended Mitigation:
should swap the last element with the element to remove and then pop the last element.
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.