Hello Arkproject,
The calculation of packedLen
includes 1 + dataLen + 1 + 1
, which seems to be hardcoded without proper explanation or justification. This might lead to incorrect packing of the string, especially if the string length is at the boundary of CAIRO_STR_LEN
or if there is an unexpected edge case.
The use of magic numbers such as 0x20
(32 bytes) and 31
(CAIRO_STR_LEN) can make the code harder to understand and maintain. It is better to define these as constants with descriptive names.
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
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.