Potential account size overflow or DoS
An attacker could attempt to pass oversized strings, potentially causing:
Malicious user creates a fund with a name > 200
bytes or description > 5000
bytes
causing account initialization failure, excessive compute unit consumption and unexpected behavior in clients parsing the data in front-end applications.
Although this is partially mitigated by Anchor's serialization, explicit checks improve security.
Manual review
Add explicit length checks.
There is a validation for the lengths of `name` and `description` in `fund_create` function: ``` pub struct Fund { #[max_len(200)] pub name: String, #[max_len(5000)] ..... } ``` Anchor will check for the lengths of these parameters and the function will fail if they have more characters than the constraints.
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.