mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
C++: Fix Code Scanning errors.
This commit is contained in:
@@ -8,8 +8,8 @@ module AllocationToInvalidPointerTest implements TestSig {
|
||||
string getARelevantTag() { result = "alloc" }
|
||||
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(DataFlow::Node allocation, PointerAddInstruction pai, DataFlow::Node sink1, int delta |
|
||||
pointerAddInstructionHasBounds(allocation, pai, sink1, delta) and
|
||||
exists(DataFlow::Node allocation, PointerAddInstruction pai, int delta |
|
||||
pointerAddInstructionHasBounds(allocation, pai, _, delta) and
|
||||
location = pai.getLocation() and
|
||||
element = pai.toString() and
|
||||
tag = "alloc"
|
||||
|
||||
@@ -48,10 +48,10 @@ module InvalidPointerToDereferenceTest implements TestSig {
|
||||
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(
|
||||
PointerArithmeticInstruction pai, DataFlow::Node derefSource, DataFlow::Node derefSink,
|
||||
DataFlow::Node operation, int delta, string value1, string value2
|
||||
DataFlow::Node derefSource, DataFlow::Node derefSink, DataFlow::Node operation, int delta,
|
||||
string value1, string value2
|
||||
|
|
||||
operationIsOffBy(_, pai, derefSource, derefSink, _, operation, delta) and
|
||||
operationIsOffBy(_, _, derefSource, derefSink, _, operation, delta) and
|
||||
location = operation.getLocation() and
|
||||
element = operation.toString() and
|
||||
tag = "deref" and
|
||||
|
||||
Reference in New Issue
Block a user