Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change adds index checks before `dirDepths[collectionIndexDirDepth]` and `dirDepths[collectionNameDepth]` to avoid indexing beyond the end of the array. We *could* just check for the `collectionIndexDirDepth` and avoid the other two, but that would be more brittle in case the constants defined a few lines earlier were reordered. We could also just calculate `len(dirsDepth)` once as a small perf improvement. This is related to the [suggestion](hyperledger#1080 (review)) from @manish-sethi in hyperledger#1080.
- Loading branch information