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

fix a possible index out of range crash #39

Merged
merged 1 commit into from
Jan 9, 2023
Merged

fix a possible index out of range crash #39

merged 1 commit into from
Jan 9, 2023

Conversation

bachue
Copy link
Contributor

@bachue bachue commented Jan 9, 2023

I met an index out of range crash and try to fix it.
Screen Shot 2023-01-09 at 17 48 27

@willscott
Copy link
Collaborator

good catch - it looks like there's a degenerate case where we recurse up with a single block where childLen wasn't getting populated. The logic here is fine.

@willscott willscott merged commit 30b9fb2 into ipfs:main Jan 9, 2023
@bachue bachue deleted the fix/crash branch January 9, 2023 13:09
hacdias pushed a commit to ipfs/boxo that referenced this pull request Jan 12, 2023
fix a possible `index out of range` crash

This commit was moved from ipfs/go-unixfsnode@30b9fb2
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