Merge pull request #22678 from owen-mc/go/fix/length-comparison-dupli… · github/codeql@e86d08b · GitHub
Skip to content

Commit e86d08b

Browse files
authored
Merge pull request #22678 from owen-mc/go/fix/length-comparison-duplicates
Go: fix some duplicate results in `go/index-out-of-bounds`
2 parents b476fdd + 8c3c029 commit e86d08b

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

‎go/ql/src/InconsistentCode/LengthComparisonOffByOne.ql‎

Lines changed: 15 additions & 5 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
| LengthComparisonOffByOne.go:8:14:8:29 | ...<=... | Off-by-one index comparison against length may lead to out-of-bounds $@. | LengthComparisonOffByOne.go:10:6:10:14 | index expression | read |
22
| main.go:6:5:6:15 | ...<=... | Off-by-one index comparison against length may lead to out-of-bounds $@. | main.go:7:10:7:13 | index expression | read |
33
| main.go:29:5:29:14 | ...>... | Off-by-one index comparison against length may lead to out-of-bounds $@. | main.go:30:10:30:13 | index expression | read |
4+
| main.go:87:7:87:17 | ...>=... | Off-by-one index comparison against length may lead to out-of-bounds $@. | main.go:93:9:93:12 | index expression | read |

‎go/ql/test/query-tests/InconsistentCode/LengthComparisonOffByOne/main.go‎

Lines changed: 10 additions & 0 deletions

0 commit comments

Comments
 (0)