File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
go/ql/lib/semmle/go/frameworks/stdlib Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -123,9 +123,19 @@ module NetHttp {
123123 private DataFlow:: Node getSummaryInputOrOutputNode (
124124 DataFlow:: CallNode call , SummaryComponentStack stack
125125 ) {
126- exists ( int n |
127- stack = SummaryComponentStack:: argument ( n ) and
128- result = call .getArgument ( n )
126+ exists ( int n | result = call .getSyntacticArgument ( n ) |
127+ if result = call .getImplicitVarargsArgument ( _)
128+ then
129+ exists (
130+ int lastParamIndex , SummaryComponentStack varArgsSliceArgument ,
131+ SummaryComponent arrayContentSC , DataFlow:: ArrayContent arrayContent
132+ |
133+ lastParamIndex = call .getCall ( ) .getCalleeType ( ) .getNumParameter ( ) - 1 and
134+ varArgsSliceArgument = SummaryComponentStack:: argument ( lastParamIndex ) and
135+ arrayContentSC = SummaryComponent:: content ( arrayContent ) and
136+ stack = SummaryComponentStack:: push ( arrayContentSC , varArgsSliceArgument )
137+ )
138+ else stack = SummaryComponentStack:: argument ( n )
129139 )
130140 or
131141 stack = SummaryComponentStack:: argument ( - 1 ) and
You can’t perform that action at this time.
0 commit comments