mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #16619 from owen-mc/go/fix/response-writer-variadic
Go: Fix bug in ResponseWriter for variadic MaD
This commit is contained in:
@@ -123,9 +123,19 @@ module NetHttp {
|
||||
private DataFlow::Node getSummaryInputOrOutputNode(
|
||||
DataFlow::CallNode call, SummaryComponentStack stack
|
||||
) {
|
||||
exists(int n |
|
||||
stack = SummaryComponentStack::argument(n) and
|
||||
result = call.getArgument(n)
|
||||
exists(int n | result = call.getSyntacticArgument(n) |
|
||||
if result = call.getImplicitVarargsArgument(_)
|
||||
then
|
||||
exists(
|
||||
int lastParamIndex, SummaryComponentStack varArgsSliceArgument,
|
||||
SummaryComponent arrayContentSC, DataFlow::ArrayContent arrayContent
|
||||
|
|
||||
lastParamIndex = call.getCall().getCalleeType().getNumParameter() - 1 and
|
||||
varArgsSliceArgument = SummaryComponentStack::argument(lastParamIndex) and
|
||||
arrayContentSC = SummaryComponent::content(arrayContent) and
|
||||
stack = SummaryComponentStack::push(arrayContentSC, varArgsSliceArgument)
|
||||
)
|
||||
else stack = SummaryComponentStack::argument(n)
|
||||
)
|
||||
or
|
||||
stack = SummaryComponentStack::argument(-1) and
|
||||
|
||||
Reference in New Issue
Block a user