Skip to content

Commit a826163

Browse files
committed
C#: Fix join order in 'getFilePathArgument'.
1 parent be175aa commit a826163

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

csharp/ql/lib/semmle/code/csharp/security/dataflow/ZipSlipQuery.qll

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,17 @@ class WrapperSanitizerMethodCall extends SanitizerMethodCall {
315315
)
316316
}
317317

318+
pragma[nomagic]
319+
private predicate paramFilePathIndex(int index) {
320+
index = wrapperMethod.paramFilePath().getIndex()
321+
}
322+
323+
318324
override Expr getFilePathArgument() {
319-
result = this.getArgument(wrapperMethod.paramFilePath().getIndex())
325+
exists(int index |
326+
this.paramFilePathIndex(index) and
327+
result = this.getArgument(index)
328+
)
320329
}
321330
}
322331

0 commit comments

Comments
 (0)