Skip to content
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

Merged
merged 3 commits into from
Jul 4, 2024
Merged

feat: remediations #6

merged 3 commits into from
Jul 4, 2024

Conversation

kopy-kat
Copy link
Member

No description provided.

@@ -55,7 +55,6 @@ library SentinelListLib {
next = self.entries[next];
self.entries[current] = ZERO_ADDRESS;
}
self.entries[SENTINEL] = ZERO_ADDRESS;
Copy link
Member Author

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;
Copy link
Member Author

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;
Copy link
Member Author

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);
Copy link
Member Author

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) {
Copy link
Member Author

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 {
Copy link
Member Author

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 {
Copy link
Member Author

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 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: fixes L4

@kopy-kat kopy-kat merged commit 5931aac into main Jul 4, 2024
3 checks passed
@kopy-kat kopy-kat deleted the feature/remediations branch July 4, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant