-
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
feat: remediations #6
Conversation
@@ -55,7 +55,6 @@ library SentinelListLib { | |||
next = self.entries[next]; | |||
self.entries[current] = ZERO_ADDRESS; | |||
} | |||
self.entries[SENTINEL] = ZERO_ADDRESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: fixes I7
@@ -86,7 +86,6 @@ library SentinelList4337Lib { | |||
next = self.entries[next][account]; | |||
self.entries[current][account] = ZERO_ADDRESS; | |||
} | |||
self.entries[SENTINEL][account] = ZERO_ADDRESS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: fixes I7
@@ -55,7 +55,6 @@ library LinkedBytes32Lib { | |||
next = self.entries[next]; | |||
self.entries[current] = ZERO; | |||
} | |||
self.entries[SENTINEL] = ZERO; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: fixes I7
@@ -71,7 +70,7 @@ library LinkedBytes32Lib { | |||
view | |||
returns (bytes32[] memory array, bytes32 next) | |||
{ | |||
if (start != SENTINEL && contains(self, start)) revert LinkedList_InvalidEntry(start); | |||
if (start != SENTINEL && !contains(self, start)) revert LinkedList_InvalidEntry(start); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: fixes L6
@@ -98,7 +97,7 @@ library LinkedBytes32Lib { | |||
* incSENTINELrent page, nor will it be included in the next one if you pass it as a | |||
* start. | |||
*/ | |||
if (next != SENTINEL) { | |||
if (next != SENTINEL && entryCount > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: fixes underflow bug previously fixed in other flavours of the lib
@@ -39,6 +39,13 @@ library SentinelListLib { | |||
self.entries[SENTINEL] = newEntry; | |||
} | |||
|
|||
function safePush(SentinelList storage self, address newEntry) internal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: fixes L4
@@ -61,6 +61,13 @@ library SentinelList4337Lib { | |||
self.entries[SENTINEL][account] = newEntry; | |||
} | |||
|
|||
function safePush(SentinelList storage self, address account, address newEntry) internal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: fixes L4
@@ -39,6 +39,13 @@ library LinkedBytes32Lib { | |||
self.entries[SENTINEL] = newEntry; | |||
} | |||
|
|||
function safePush(LinkedBytes32 storage self, bytes32 newEntry) internal { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: fixes L4
No description provided.