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
Loan[] public loans; change to Loan[] private loans = new Loan;
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
Olympix
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.