Index: trunk/extensions/ParserFunctions/Expr.php |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | define( 'EXPR_ROUND', 21 );
|
34 | 34 |
|
35 | 35 | class ExprParser {
|
36 | | - var $maxStackSize = 1000;
|
| 36 | + var $maxStackSize = 100;
|
37 | 37 |
|
38 | 38 | var $precedence = array(
|
39 | 39 | EXPR_NEGATIVE => 9,
|
— | — | @@ -136,8 +136,9 @@ |
137 | 137 |
|
138 | 138 |
|
139 | 139 | while ( $p < $end ) {
|
140 | | - if ( count( $operands ) > $this->maxStackSize || count( $operands ) > $this->maxStackSize ) {
|
| 140 | + if ( count( $operands ) > $this->maxStackSize || count( $operators ) > $this->maxStackSize ) {
|
141 | 141 | $this->error( 'stack_exhausted' );
|
| 142 | + return false;
|
142 | 143 | }
|
143 | 144 | $char = $expr[$p];
|
144 | 145 | $char2 = substr( $expr, $p, 2 );
|