the recursive function _selectPresidentRecursive
may loop indefinitely, eventually causing a stack overflow and transaction failure.
The recursive `src/RankedChoice::_selectPresidentRecursive
function assumes that at least one candidate remains at each step.If somehow the function is called with an empty candidateList
, it would cause an infinite recursion or unexpected behavior.
Election process would fail, and the contract could become stuck in an unusable state until the issue is manually resolved.
Manual Review
Add a validation check to ensure that the candidate list is never empty.
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.