Use _ instead of exists variable x2

This commit is contained in:
Owen Mansel-Chan
2025-09-02 15:51:37 +01:00
parent a3eb0100a6
commit 32de2113a6
2 changed files with 3 additions and 7 deletions

View File

@@ -349,10 +349,8 @@ private module Internal {
varBlockReachesBaseCand(v, b1, b2) and
blockPrecedesVar(v, b2)
or
exists(ReachableBasicBlock mid |
varBlockReachesRecCand(v, b1, mid, b2) and
blockPrecedesVar(v, b2)
)
varBlockReachesRecCand(v, b1, _, b2) and
blockPrecedesVar(v, b2)
}
/**

View File

@@ -79,9 +79,7 @@ module LogInjection {
*/
private class SafeFormatArgumentSanitizer extends Sanitizer {
SafeFormatArgumentSanitizer() {
exists(DataFlow::Node arg, StringOps::Formatting::StringFormatCall call |
safeFormatArgument(arg, call)
|
exists(StringOps::Formatting::StringFormatCall call | safeFormatArgument(_, call) |
this = call.getAResult()
)
}