RustFund

First Flight #36
Beginner FriendlyRust
100 EXP
View results
Submission Details
Severity: low
Invalid

Inconsistent Naming of deadline_set Variables in fund_create(), set_deadline() Functions and Fund Struct

Summary

The contract contains inconsistent and incorrect naming of deadline_set related variables across various functions fund_create(), set_deadline() and the Fund struct. This issue may lead to confusion during maintenance and could potentially cause errors in future modifications.

Vulnerability Details

In the contract, the deadline_set variable is inconsistently named. For example, in the_ fundcreate _function the deadline__set is initialized as dealine_set, in the Fund struct and set_deadline function it is referenced with a misspelled name (dealine_set). This inconsistency in naming conventions can cause misunderstandings during code review and maintenance, and may lead to bugs if future updates assume a consistent naming convention.

Impact

  • Increases the risk of human error during code maintenance or when extending functionality.

  • Can lead to misinterpretation of the code’s logic regarding deadline handling.

  • May result in unintended behavior if new changes rely on the incorrectly named variables.

Tools Used

  • Manual code review

Recommendations

  • Standardize the naming of deadline-related variables across the entire codebase.

  • Rename dealine_set to deadline_set in the Fund struct and update all its references in the contract functions.

Updates

Appeal created

bube Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

[Invalid] Wrong naming of `deadline_set`

This is strong informational finding, there is no impact for the protocol. The variable is the same on all places.

Support

FAQs

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