mirror of
https://github.com/github/codeql.git
synced 2026-04-24 08:15:14 +02:00
Merge pull request #19510 from GeekMasher/cpp-wmain
C/CPP: Update FlowSources to add wmain
This commit is contained in:
4
cpp/ql/lib/change-notes/2025-05-16-wmain-support.md
Normal file
4
cpp/ql/lib/change-notes/2025-05-16-wmain-support.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: feature
|
||||
---
|
||||
* Added support for `wmain` as part of the ArgvSource model.
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user