mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
C++: Fix ql-for-ql alerts.
This commit is contained in:
@@ -887,7 +887,7 @@ class ThisParameterNode extends ParameterNode, InstructionNode {
|
||||
}
|
||||
|
||||
pragma[noinline]
|
||||
private predicate indirectPostionHasArgumentIndexAndIndex(
|
||||
private predicate indirectPositionHasArgumentIndexAndIndex(
|
||||
IndirectionPosition pos, int argumentIndex, int indirectionIndex
|
||||
) {
|
||||
pos.getArgumentIndex() = argumentIndex and
|
||||
@@ -907,7 +907,7 @@ class ParameterIndirectionNode extends ParameterNode instanceof IndirectParamete
|
||||
override predicate isParameterOf(Function f, ParameterPosition pos) {
|
||||
IndirectParameterNode.super.getEnclosingCallable() = f and
|
||||
exists(int argumentIndex, int indirectionIndex |
|
||||
indirectPostionHasArgumentIndexAndIndex(pos, argumentIndex, indirectionIndex) and
|
||||
indirectPositionHasArgumentIndexAndIndex(pos, argumentIndex, indirectionIndex) and
|
||||
indirectParameterNodeHasArgumentIndexAndIndex(this, argumentIndex, indirectionIndex)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ private import semmle.code.cpp.models.interfaces.DataFlow
|
||||
private import semmle.code.cpp.models.interfaces.SideEffect
|
||||
private import DataFlowUtil
|
||||
private import DataFlowPrivate
|
||||
private import semmle.code.cpp.models.Models
|
||||
|
||||
/**
|
||||
* Holds if taint propagates from `nodeFrom` to `nodeTo` in exactly one local
|
||||
@@ -133,7 +132,7 @@ predicate defaultImplicitTaintRead(DataFlow::Node node, DataFlow::Content c) { n
|
||||
predicate defaultTaintSanitizer(DataFlow::Node node) { none() }
|
||||
|
||||
/**
|
||||
* Holds if taint can flow from `instrIn` to `instrOut` through a call to a
|
||||
* Holds if taint can flow from `nodeIn` to `nodeOut` through a call to a
|
||||
* modeled function.
|
||||
*/
|
||||
predicate modeledTaintStep(DataFlow::Node nodeIn, DataFlow::Node nodeOut) {
|
||||
|
||||
Reference in New Issue
Block a user