RustFund

First Flight #36
Beginner FriendlyRust
100 EXP
View results
Submission Details
Severity: medium
Valid

dead_line status not set

Summary

Deadline_set status not updated after calling set__deadline

Vulnerability Details

In the set``deadline function , after checking if the deadline_set is false, the deadline__set status is not updated after the function executes completely.

Impact

This can lead to DOS issues when trying to contribute where the status of the Fund account is necessary to deem it fit to be contributed to.

Tools Used

Manual review

Recommendations

pub fn _set_deadline(ctx: Context<FundSetDeadline>, deadline: u64) -> Result<()> {
let fund = &mut ctx.accounts.fund;
if fund.dealine_set {
return Err(ErrorCode::DeadlineAlreadySet.into());
}
fund.deadline = deadline;
//UPDATE THE DEADLINE_SET BOOL STATUS
//fund.deadline_set = true;
Ok(())
}
Updates

Appeal created

bube Lead Judge 3 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Deadline set flag is not updated in `set_deadline` function

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.