Platform: Code4rena
Start Date: 14/04/2023
Pot Size: $90,500 USDC
Total HM: 7
Participants: 59
Period: 14 days
Judge: LSDan
Total Solo HM: 3
Id: 232
League: ETH
Rank: 51/59
Findings: 1
Award: $59.79
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Sathish9098
Also found by: 0x73696d616f, 0xAgro, 0xSmartContract, 0xTheC0der, ABA, ArbitraryExecution, Aymen0909, BRONZEDISC, Bauchibred, Dyear, Eurovickk, IceBear, Jerry0x, Jorgect, Josiah, MalfurionWhitehat, MohammedRizwan, RaymondFam, Recep, Rickard, SAAJ, Shubham, Udsen, auditor0517, brgltd, catellatech, chaduke, codeslide, eierina, favelanky, j4ld1na, lukris02, matrix_0wl, naman1778, pontifex, schrodinger, tnevler, urataps
59.7928 USDC - $59.79
There is no necessity to declare variables separately from destructuring assignment when calling another function that returns multiple values. Declare them in one line with assignments similar to other places of the protocol. There are four instances:
35: bool found; 36: address addr; 37: (addr, found) = parseRR(data, iter.rdataOffset, iter.nextOffset);
55: bool found; 56: address addr; 57: (addr, found) = parseString(rdata, idx, len);
39: bool ok; 40: bytes memory result; 41: (ok, result) = RSAVerify.rsarecover(modulus, exponent, sig);
38: bool ok; 39: bytes memory result; 40: (ok, result) = RSAVerify.rsarecover(modulus, exponent, sig);
constant
should be defined rather than using magic numberUse readable constant instead of a numeric value with a comment. There are two instances:
72: if (str.readUint32(idx) != 0x613d3078) return (address(0x0), false); // 0x613d3078 == 'a=0x'
294: if (dnskey.protocol != 3) {
#0 - thereksfour
2023-05-02T03:35:58Z
2 NCs
#1 - c4-pre-sort
2023-05-02T03:36:02Z
thereksfour marked the issue as low quality report
#2 - c4-judge
2023-05-09T10:40:41Z
dmvt marked the issue as grade-b