Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cpp/ql/lib/change-notes/2025-05-16-wmain-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: feature
---
* Added support for `wmain` as part of the ArgvSource model.
4 changes: 2 additions & 2 deletions cpp/ql/lib/semmle/code/cpp/security/FlowSources.qll
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ private class LocalModelSource extends LocalFlowSource {
}

/**
* A local data flow source that the `argv` parameter to `main`.
* A local data flow source that the `argv` parameter to `main` or `wmain`.
*/
private class ArgvSource extends LocalFlowSource {
ArgvSource() {
exists(Function main, Parameter argv |
main.hasGlobalName("main") and
main.hasGlobalName(["main", "wmain"]) and
main.getParameter(1) = argv and
this.asParameter(2) = argv
)
Expand Down