Skip to content

Commit bae7e10

Browse files
committed
C++: Also add MSVC-related 'alloca'-like functions.
1 parent ec63099 commit bae7e10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ReturnStackAllocatedMemoryConfig extends MustFlowConfiguration {
4444
// `source` is an instruction that represents the return value of a
4545
// function that is known to return stack-allocated memory.
4646
exists(Call call |
47-
call.getTarget().hasGlobalName(["alloca", "strdupa", "strndupa"]) and
47+
call.getTarget().hasGlobalName(["alloca", "strdupa", "strndupa", "_alloca", "_malloca"]) and
4848
source.getUnconvertedResultExpression() = call
4949
)
5050
)

0 commit comments

Comments
 (0)