8000 fixup! add max distance limit · coder/coder@ad36036 · GitHub
[go: up one dir, main page]

Skip to content

Commit ad36036

Browse files
committed
fixup! add max distance limit
1 parent d7a5321 commit ad36036

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/cliutil/levenshtein/levenshtein.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func Distance(a, b string, maxDist int) (int, error) {
5858

5959
// Target prefixes
6060
for j = 1; j < n; j++ {
61-
d[0][j] = j
61+
d[0][j] = j // nolint:gosec // this cannot overflow
6262
}
6363

6464
// Compute the distance

0 commit comments

Comments
 (0)
0