Skip to content

Commit

Permalink
Merge pull request ipfs/go-unixfsnode#39 from bachue/fix/crash
Browse files Browse the repository at this point in the history
fix a possible `index out of range` crash

This commit was moved from ipfs/go-unixfsnode@30b9fb2
  • Loading branch information
willscott authored Jan 9, 2023
2 parents a48c4ab + 971cdf4 commit f46daff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions unixfs/node/data/builder/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func fileTreeRecursive(depth int, children []ipld.Link, childLen []uint64, src c
}
totalSize += sz
children = append(children, nxt)
childLen = append(childLen, sz)
blksizes = append(blksizes, sz)
}
if len(children) == 0 {
Expand Down

0 comments on commit f46daff

Please sign in to comment.