mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
Merge pull request #6794 from geoffw0/impropnullfp
C++: Improvements to cpp/improper-null-termination
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
* @kind problem
|
||||
* @id cpp/improper-null-termination
|
||||
* @problem.severity warning
|
||||
* @precision medium
|
||||
* @security-severity 7.8
|
||||
* @tags security
|
||||
* external/cwe/cwe-170
|
||||
@@ -53,6 +54,7 @@ class ImproperNullTerminationReachability extends StackVariableReachabilityWithR
|
||||
override predicate isBarrier(ControlFlowNode node, StackVariable v) {
|
||||
exprDefinition(v, node, _) or
|
||||
mayAddNullTerminator(node, v.getAnAccess()) or
|
||||
node.(AddressOfExpr).getOperand() = v.getAnAccess() or // address taken
|
||||
isSinkActual(node, v) // only report first use
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* @kind problem
|
||||
* @id cpp/user-controlled-null-termination-tainted
|
||||
* @problem.severity warning
|
||||
* @precision medium
|
||||
* @security-severity 10.0
|
||||
* @tags security
|
||||
* external/cwe/cwe-170
|
||||
|
||||
Reference in New Issue
Block a user