The feedHorse
and isHappyHorse
functions in the HorseStore
huff code lack specification of their input parameters in their corresponding macros. This oversight can lead to confusion and errors during code execution, as it may not be clear to developers or auditors what input parameters are expected by these functions.
The vulnerability arises from the discrepancy between the function declarations and their corresponding macro implementations. In the function declarations, both feedHorse
and isHappyHorse
specify a uint256
input parameter, indicating that they expect a horseId
as input. However, in their macro implementations, the input parameters are not explicitly defined, leading to potential issues in understanding and using these macros.
The impact of this issue is primarily on code clarity and maintainability. Developers and auditors reviewing the code may find it challenging to understand the intended usage of these macros due to the absence of explicit input parameter specifications. This can result in misinterpretation, potential errors during integration, and difficulties in maintaining or modifying the code.
Manual review.
To address this issue, it is recommended to update the macro definitions for FEED_HORSE
and IS_HAPPY_HORSE
to explicitly mention their input parameters, aligning them with the corresponding function declarations. This ensures clarity in the code and assists developers and auditors in understanding the expected input parameters for these functions.
Update code should look like this:
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.