Skip to content

Commit df28e3b

Browse files
authored
Merge pull request #19510 from GeekMasher/cpp-wmain
C/CPP: Update FlowSources to add wmain
2 parents d7e07b0 + 9d2b46e commit df28e3b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: feature
3+
---
4+
* Added support for `wmain` as part of the ArgvSource model.

cpp/ql/lib/semmle/code/cpp/security/FlowSources.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ private class LocalModelSource extends LocalFlowSource {
5555
}
5656

5757
/**
58-
* A local data flow source that the `argv` parameter to `main`.
58+
* A local data flow source that the `argv` parameter to `main` or `wmain`.
5959
*/
6060
private class ArgvSource extends LocalFlowSource {
6161
ArgvSource() {
6262
exists(Function main, Parameter argv |
63-
main.hasGlobalName("main") and
63+
main.hasGlobalName(["main", "wmain"]) and
6464
main.getParameter(1) = argv and
6565
this.asParameter(2) = argv
6666
)

0 commit comments

Comments
 (0)