The setPrediction
function does not validate the matchNumber
, allowing potential submission of invalid match numbers. This can lead to incorrect predictions being recorded.
Improper Validation of matchNumber
: The function lacks a check to ensure matchNumber
is within a valid range. This could result in incorrect or unintended predictions being set for non-existent matches.
Logical Errors: Allowing matchNumber
to be greater than 9 can result in predictions being stored in unintended indices of the predictions
array, potentially leading to incorrect game outcomes or corrupted data.
Manual Code Review
Add Match Number Validation: Ensure that matchNumber
is within the valid range before proceeding with setting the prediction. For example, if the valid range is 0-9:
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.