Skip to content

Commit 9857a85

Browse files
committed
CPP: Fix similar queries.
1 parent d3c6d83 commit 9857a85

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingChar.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ predicate defSourceType(SsaDefinition def, LocalScopeVariable v,
8989
| p = v and
9090
def.definedByParameter(p) and
9191
sourceType = p.getType().getUnspecifiedType() and
92+
strictcount(p.getType()) = 1 and
9293
isPointerType(sourceType) and
9394
sourceLoc = p.getLocation())
9495
}

cpp/ql/src/Security/CWE/CWE-468/IncorrectPointerScalingVoid.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ predicate defSourceType(SsaDefinition def, LocalScopeVariable v,
8989
| p = v and
9090
def.definedByParameter(p) and
9191
sourceType = p.getType().getUnspecifiedType() and
92+
strictcount(p.getType()) = 1 and
9293
isPointerType(sourceType) and
9394
sourceLoc = p.getLocation())
9495
}

0 commit comments

Comments
 (0)