_getBeneficiaryIndex will return 0 if the beneficiary address does not exist in the beneficiaries array, which may result in deleting a legitimate beneficiary at index 0.
In this function, we have the following issue:
There is no index assignment in case the beneficiary is not found. Since index is declared as uint in the function, it defaults to 0 if the beneficiary does not exist. This can lead to unintended deletions.
A legitimate beneficiary at index 0 may be deleted instead of the intended one.
Manual review
Implement a revert mechanism to prevent this from happening.
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.