File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
javascript/ql/src/semmle/javascript/dataflow/internal Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -697,14 +697,14 @@ abstract private class CallWithAnalyzedParameters extends FunctionWithAnalyzedPa
697697 }
698698
699699 override predicate mayReceiveArgument ( Parameter p ) {
700- exists ( DataFlow:: InvokeNode invk , int argIdx |
701- invk = getAnInvocation ( ) and
702- p = getParameter ( argIdx )
703- |
704- exists ( invk .getArgument ( argIdx ) )
705- or
706- invk .asExpr ( ) .( InvokeExpr ) .isSpreadArgument ( [ 0 .. argIdx ] )
700+ exists ( int argIdx |
701+ p = getParameter ( argIdx ) and
702+ getAnInvocation ( ) .getNumArgument ( ) > argIdx
707703 )
704+ or
705+ // All parameters may receive an argument if invoked with a spread argument
706+ p = getAParameter ( ) and
707+ getAnInvocation ( ) .asExpr ( ) .( InvokeExpr ) .isSpreadArgument ( _)
708708 }
709709}
710710
You can’t perform that action at this time.
0 commit comments