diff --git a/cpp/ql/lib/change-notes/2025-05-16-wmain-support.md b/cpp/ql/lib/change-notes/2025-05-16-wmain-support.md new file mode 100644 index 000000000000..bdc369bfeddc --- /dev/null +++ b/cpp/ql/lib/change-notes/2025-05-16-wmain-support.md @@ -0,0 +1,4 @@ +--- +category: feature +--- +* Added support for `wmain` as part of the ArgvSource model. \ No newline at end of file diff --git a/cpp/ql/lib/semmle/code/cpp/security/FlowSources.qll b/cpp/ql/lib/semmle/code/cpp/security/FlowSources.qll index 2aef5e6e7df3..b5e94d4c0463 100644 --- a/cpp/ql/lib/semmle/code/cpp/security/FlowSources.qll +++ b/cpp/ql/lib/semmle/code/cpp/security/FlowSources.qll @@ -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 )