File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
ruby/ql/lib/codeql/ruby/controlflow Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ class ExprCfgNode extends AstCfgNode {
108
108
}
109
109
110
110
/** Gets the textual (constant) value of this expression, if any. */
111
+ cached
111
112
string getValueText ( ) { result = this .getSource ( ) .getValueText ( ) }
112
113
}
113
114
@@ -247,7 +248,18 @@ module ExprNodes {
247
248
result = ( left .toFloat ( ) + right .toFloat ( ) ) .toString ( )
248
249
or
249
250
not ( exists ( left .toFloat ( ) ) and exists ( right .toFloat ( ) ) ) and
250
- result = left + right
251
+ exists ( int l , int r , int limit |
252
+ l = left .length ( ) and
253
+ r = right .length ( ) and
254
+ limit = 10000
255
+ |
256
+ if l > limit
257
+ then result = left .prefix ( limit ) + "..."
258
+ else
259
+ if l + r > limit
260
+ then result = left + right .prefix ( limit - l ) + "..."
261
+ else result = left + right
262
+ )
251
263
)
252
264
or
253
265
op = "-" and
You can’t perform that action at this time.
0 commit comments