When we are adding new elements into whitelists in L2Bridge
we are using a Linked list for that mission. To know the ending of the linked list we do two checks. The next element should be either zero or not activated to represent that this is the ending of the linked list.
As we can see we check that the next is not zero, or it is not active to represent the ending of the linked list.
The problem is that this check is not implemented corectly in case of removing where instead of checking the activation of the next element we are checking the activation of the current element, which is not a correct check to determine the ending of the linked list.
As we can see we are checking the activation of the prev
node, not the next node, which is not the correct check that is implemented when adding new elements.
This is an incorrect logic in the code, where reaching to the end of the array should have the same logic when adding or removing.
Check for the activation of the next
node instead of the prev
when removing.
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.