From e46b215c9d45556f85e73019d15cbfc0b48ec044 Mon Sep 17 00:00:00 2001 From: Robert Marsh Date: Thu, 29 Sep 2022 10:53:29 -0400 Subject: [PATCH] C++: fix metadata and result format --- .../src/experimental/Likely Bugs/ConstantSizeArrayOffByOne.ql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/ql/src/experimental/Likely Bugs/ConstantSizeArrayOffByOne.ql b/cpp/ql/src/experimental/Likely Bugs/ConstantSizeArrayOffByOne.ql index a21cc43f4a2..a2c9266ca56 100644 --- a/cpp/ql/src/experimental/Likely Bugs/ConstantSizeArrayOffByOne.ql +++ b/cpp/ql/src/experimental/Likely Bugs/ConstantSizeArrayOffByOne.ql @@ -1,6 +1,6 @@ /** * @id cpp/constant-size-array-off-by-one - * @kind path-problem + * @kind problem */ import experimental.semmle.code.cpp.semantic.analysis.RangeAnalysis @@ -20,5 +20,5 @@ where delta >= size and size != 0 and // sometimes 0 or 1 is used for a variable-size array size != 1 -select pai, "This pointer may have an off-by-" + (delta - size) + "error allowing it to overrun $@", +select pai, "This pointer may have an off-by-" + (delta - size + 1) + " error allowing it to overrun $@", fai.getField(), fai.getField().toString()