Skip to content

Commit 8d1b080

Browse files
committed
limit size of getStringValue
1 parent ac89559 commit 8d1b080

File tree

1 file changed

+2
-1
lines changed
  • javascript/ql/src/semmle/javascript

1 file changed

+2
-1
lines changed

javascript/ql/src/semmle/javascript/Expr.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,8 @@ class AddExpr extends @addexpr, BinaryExpr {
15191519
override string getOperator() { result = "+" }
15201520

15211521
override string getStringValue() {
1522-
result = getLeftOperand().getStringValue() + getRightOperand().getStringValue()
1522+
result = getLeftOperand().getStringValue() + getRightOperand().getStringValue() and
1523+
result.length() < 1000 * 1000
15231524
}
15241525
}
15251526

0 commit comments

Comments
 (0)