Skip to content

triedb/pathdb: add bounds check in decodeKeyEntry to prevent panic#33718

Closed
Aleksandr1732 wants to merge 1 commit intoethereum:masterfrom
Aleksandr1732:patch-9
Closed

triedb/pathdb: add bounds check in decodeKeyEntry to prevent panic#33718
Aleksandr1732 wants to merge 1 commit intoethereum:masterfrom
Aleksandr1732:patch-9

Conversation

@Aleksandr1732
Copy link
Copy Markdown
Contributor

This PR adds a bounds check to decodeKeyEntry before slicing keySection[offset:] to prevent potential runtime panics when processing corrupted or malformed trie data.

@rjl493456442
Copy link
Copy Markdown
Member

It's unnecessary. This function implicitly assumes the offset should never exceeds the slice bound

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.

2 participants