Skip to content

Commit e46b215

Browse files
committed
C++: fix metadata and result format
1 parent b93a2b0 commit e46b215

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/src/experimental/Likely Bugs/ConstantSizeArrayOffByOne.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @id cpp/constant-size-array-off-by-one
3-
* @kind path-problem
3+
* @kind problem
44
*/
55

66
import experimental.semmle.code.cpp.semantic.analysis.RangeAnalysis
@@ -20,5 +20,5 @@ where
2020
delta >= size and
2121
size != 0 and // sometimes 0 or 1 is used for a variable-size array
2222
size != 1
23-
select pai, "This pointer may have an off-by-" + (delta - size) + "error allowing it to overrun $@",
23+
select pai, "This pointer may have an off-by-" + (delta - size + 1) + " error allowing it to overrun $@",
2424
fai.getField(), fai.getField().toString()

0 commit comments

Comments
 (0)