Skip to content

Commit

Permalink
Mollify CodeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCutter committed Nov 14, 2022
1 parent 4d33137 commit f0f7a34
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions experimental/batchmap/cmd/verify/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ func getTilesForKey(mapDir string, key []byte) ([]*batchmap.Tile, error) {

// toNode converts a TileLeaf into the equivalent Node for HStar3.
func toNode(prefix []byte, l *batchmap.TileLeaf) smt.Node {
// CodeQL mollification:
if pLen := len(prefix) + len(l.Path); pLen > 1*1024*1024 {
panic(fmt.Sprintf("absurd path length %d", pLen))
}
path := make([]byte, 0, len(prefix)+len(l.Path))
path = append(append(path, prefix...), l.Path...)
return smt.Node{
Expand Down

0 comments on commit f0f7a34

Please sign in to comment.