File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
ruby/ql/lib/codeql/ruby/frameworks Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,15 @@ class StringPercentCall extends PrintfStyleCall {
8787 override DataFlow:: Node getFormatString ( ) { result = this .getReceiver ( ) }
8888
8989 override DataFlow:: Node getFormatArgument ( int n ) {
90- exists ( Ast :: Call call | call = this .asExpr ( ) . getExpr ( ) |
91- exists ( Ast :: ArrayLiteral arrLit | arrLit = call .getArgument ( 0 ) |
92- result . asExpr ( ) . getExpr ( ) = arrLit . getElement ( n )
93- )
94- or
95- exists ( Ast :: HashLiteral hashLit | hashLit = call .getArgument ( 0 ) |
96- n = - 2 and // -2 is indicates that the index does not make sense in this context
97- result . asExpr ( ) . getExpr ( ) = hashLit . getAnElement ( )
98- )
90+ exists ( CfgNodes :: ExprNodes :: ArrayLiteralCfgNode arrLit | arrLit = this .getArgument ( 0 ) . asExpr ( ) |
91+ result . asExpr ( ) = arrLit .getArgument ( n )
92+ )
93+ or
94+ exists ( CfgNodes :: ExprNodes :: HashLiteralCfgNode hashLit |
95+ hashLit = this .getArgument ( 0 ) . asExpr ( )
96+ |
97+ n = - 2 and // -2 is indicates that the index does not make sense in this context
98+ result . asExpr ( ) = hashLit . getAKeyValuePair ( ) . getValue ( )
9999 )
100100 }
101101
You can’t perform that action at this time.
0 commit comments