Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4ddac74

Browse files
committed
C++: Add change note
Also fix discrepancies between `SignedOverflowCheck.ql` and its change note.
1 parent 2d72a9c commit 4ddac74

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

change-notes/1.23/analysis-cpp.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ The following changes in version 1.23 affect C/C++ analysis in all applications.
99
| **Query** | **Tags** | **Purpose** |
1010
|-----------------------------|-----------|--------------------------------------------------------------------|
1111
| Hard-coded Japanese era start date (`cpp/japanese-era/exact-era-date`) | reliability, japanese-era | This query is a combination of two old queries that were identical in purpose but separate as an implementation detail. This new query replaces Hard-coded Japanese era start date in call (`cpp/japanese-era/constructor-or-method-with-exact-era-date`) and Hard-coded Japanese era start date in struct (`cpp/japanese-era/struct-with-exact-era-date`). |
12-
| Signed overflow check (`cpp/signed-overflow-check`) | correctness, reliability | Finds overflow checks that rely on signed integer addition to overflow, which has undefined behavior. Example: `a + b < a`. |
12+
| Signed overflow check (`cpp/signed-overflow-check`) | correctness, security | Finds overflow checks that rely on signed integer addition to overflow, which has undefined behavior. Example: `a + b < a`. |
13+
| Pointer overflow check (`cpp/pointer-overflow-check`) | correctness, security | Finds overflow checks that rely on pointer addition to overflow, which has undefined behavior. Example: `ptr + a < ptr`. |
1314

1415
## Changes to existing queries
1516

cpp/ql/src/Likely Bugs/Arithmetic/SignedOverflowCheck.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/**
2-
* @name Undefined result of signed test for overflow
2+
* @name Signed overflow check
33
* @description Testing for overflow by adding a value to a variable
44
* to see if it "wraps around" works only for
55
* unsigned integer values.
66
* @kind problem
77
* @problem.severity warning
88
* @precision high
99
* @id cpp/signed-overflow-check
10-
* @tags reliability
10+
* @tags correctness
1111
* security
1212
*/
1313

0 commit comments

Comments
 (0)