Skip to content

Commit 7994795

Browse files
authored
Merge pull request github#14509 from MathiasVP/tag-redundant-null-check-simple-as-security
C++: Mark `cpp/redundant-null-check-simple` as a security query
2 parents fe2468e + ba27a0d commit 7994795

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cpp/ql/src/Likely Bugs/RedundantNullCheckSimple.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
* it should be moved before the dereference.
66
* @kind path-problem
77
* @problem.severity error
8+
* @security-severity 7.5
89
* @precision high
910
* @id cpp/redundant-null-check-simple
1011
* @tags reliability
1112
* correctness
13+
* security
1214
* external/cwe/cwe-476
1315
*/
1416

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
category: newQuery
3+
---
4+
* The query `cpp/redundant-null-check-simple` has been promoted to Code Scanning. The query finds cases where a pointer is compared to null after it has already been dereferenced. Such comparisons likely indicate a bug at the place where the pointer is dereferenced, or where the pointer is compared to null.
5+
6+
Note: This query was incorrectly noted as being promoted to Code Scanning in CodeQL version 2.14.6.

0 commit comments

Comments
 (0)