Use of OR in MathMasters::mulWadUp overflow check results in overflow.
The function checks for potential overflow in the context of fixed-point arithmetic by using the OR operator. However, the OR operator itself can cause an overflow. In this case, the first condition checks if y is non-zero and if x is greater than the maximum value divided by y. The second condition checks if x is non-zero.
In situations where x is 2 and y is 5.789e76, an overflow will occur.
Foundry:: Forge::Fuzz Test
Use a different method to check for potential overflow or do not check for x being non-zero. The equivalent function in solady, for example, does not check if x is non-zero in its overflow check.
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.