mirror of
https://github.com/github/codeql.git
synced 2025-12-15 16:23:11 +01:00
Rust: Apply same filtering of generated summaries as in C# and Java
This commit is contained in:
@@ -60,7 +60,7 @@ private module DispatchImpl {
|
||||
not (
|
||||
// Only use summarized callables with generated summaries in case
|
||||
// the static call target is not in the source code.
|
||||
// Note that if applyGeneratedModel holds it implies that there doesn't
|
||||
// Note that if `applyGeneratedModel` holds it implies that there doesn't
|
||||
// exist a manual model.
|
||||
exists(Callable staticTarget | staticTarget = call.getCallee().getSourceDeclaration() |
|
||||
staticTarget.fromSource() and not staticTarget.isStub()
|
||||
|
||||
@@ -445,7 +445,15 @@ module RustDataFlow implements InputSig<Location> {
|
||||
or
|
||||
exists(SummarizedCallable sc, Function staticTarget |
|
||||
staticTarget = getStaticTargetExt(c) and
|
||||
sc = result.asSummarizedCallable()
|
||||
sc = result.asSummarizedCallable() and
|
||||
// Only use summarized callables with generated summaries in case
|
||||
// the static call target is not in the source code.
|
||||
// Note that if `applyGeneratedModel` holds it implies that there doesn't
|
||||
// exist a manual model.
|
||||
not (
|
||||
staticTarget.fromSource() and
|
||||
sc.applyGeneratedModel()
|
||||
)
|
||||
|
|
||||
sc = staticTarget
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user