mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
C++: Also add MSVC-related 'alloca'-like functions.
This commit is contained in:
@@ -44,7 +44,7 @@ class ReturnStackAllocatedMemoryConfig extends MustFlowConfiguration {
|
|||||||
// `source` is an instruction that represents the return value of a
|
// `source` is an instruction that represents the return value of a
|
||||||
// function that is known to return stack-allocated memory.
|
// function that is known to return stack-allocated memory.
|
||||||
exists(Call call |
|
exists(Call call |
|
||||||
call.getTarget().hasGlobalName(["alloca", "strdupa", "strndupa"]) and
|
call.getTarget().hasGlobalName(["alloca", "strdupa", "strndupa", "_alloca", "_malloca"]) and
|
||||||
source.getUnconvertedResultExpression() = call
|
source.getUnconvertedResultExpression() = call
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user