-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QA Report #118
Comments
L-1 makes sense, even though the borrower has the option to transfer tokens from another account and enter the condition Try the following test: function test3doc() external {
string memory testStr = hex'0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20';
(bytes32 word0, bytes32 word1) = _packString(testStr);
console.logBytes32(word0);
console.logBytes32(word1);
}
function _packString(string memory str) internal pure returns (bytes32 word0, bytes32 word1) {
assembly {
let length := mload(str)
// Equivalent to:
// if (str.length > 63) revert NameOrSymbolTooLong();
if gt(length, 0x3f) {
mstore(0, 0x19a65cb6)
revert(0x1c, 0x04)
}
// Load the length and first 31 bytes of the string into the first word
// by reading from 31 bytes after the length pointer.
word0 := mload(add(str, 0x1f))
// If the string is less than 32 bytes, the second word will be zeroed out.
word1 := mul(mload(add(str, 0x3f)), gt(mload(str), 0x1f))
}
} Output with the current implementation is correct:
while the recommended fix breaks it:
L-9 I would not count this one, it's an NC Stopping here. As said in other QC reports, harmful recommendations are not welcome. |
3docSec marked the issue as grade-c |
Hi @3docSec Thank you for your feedback and valuable comments. I understand that my grade was reduced to a C due to some of my suggestions and invalid findings potentially impacting the protocol. However, I believe it’s important to acknowledge that errors are an inherent aspect of the warden’s role. In this submission model, it’s impossible to submit only valid findings and suggestions. The process naturally involves a mixture of valid and invalid assessments, based on the warden’s understanding of the issue at the time. It is the judges who ultimately determine which findings are correct. While I accept that some of my findings were incorrect, it’s worth noting that I have submitted more [L-16] Potential for DoS by returning overly large arrays If my understanding of the grading criteria is incorrect, I would appreciate any further clarification. Thank you for your time and consideration. |
Hi @sathishpic22, no, you are not required to submit only valid findings, far from that.
In other words, the existence of invalid findings does not weigh on this report as much as it does their count relative to the solid findings. |
See the markdown file with the details of this report here.
The text was updated successfully, but these errors were encountered: