20,000 USDC
View results
Submission Details
Severity: high

Loan[] array

Summary

The loans array is a public state variable in the contract that isn't initialized.
Issues:
-> Uninitialized storage variables can unexpectedly point to other local storage variables in the contract, leading to potential data manipulation.
-> If the array is accessed before being initialized, it could lead to unpredictable behavior, as it might contain random data.
-> The variable is also public, making it visible and accessible to other contracts. This could leave it open to misuse or abuse

Vulnerability Details

Loan[] public loans; change to Loan[] private loans = new Loan;

Impact

loans is initialized as an empty array and its visibility is set to private. This ensures that the state variable is only accessible within the contract, helping to prevent unauthorized access or manipulation

Tools Used

Olympix

Recommendations

Support

FAQs

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