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

[Issue-1368]: Panic in serializedPath.HasPrefix #1371

Merged
merged 11 commits into from
Apr 20, 2023
Merged

[Issue-1368]: Panic in serializedPath.HasPrefix #1371

merged 11 commits into from
Apr 20, 2023

Conversation

dboehm-avalabs
Copy link
Contributor

@dboehm-avalabs dboehm-avalabs commented Apr 17, 2023

Add a check to ensure that invalid paths are just considered not prefixes rather than causing a panic. Change SerializedPaths to make it more difficult to construct invalid ones. An empty value and odd length is still an issue, but this prevents mismatched NibbleLength & Value size SerializedPaths from being constructed

I'm not sure that part two of issue 1368 is a bug. SerializedPath is just a wrapper around an array, so it behaves like an array when trying to access out of bounds indices.

@dboehm-avalabs dboehm-avalabs added the bug Something isn't working label Apr 19, 2023
@danlaine danlaine merged commit d28d50b into dev Apr 20, 2023
@danlaine danlaine deleted the Issue-1368 branch April 20, 2023 13:24
@patrick-ogrady patrick-ogrady added this to the v1.10.1 milestone Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working merkledb
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants