[php-src] PR #11424: Add stack limit check in zend_eval_const_expr()
| From: | arnaud-lb | Date: | Sun, 11 Jun 2023 12:56:51 +0000 |
| Subject: | [php-src] PR #11424: Add stack limit check in zend_eval_const_expr() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-22707@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/11424
Author: arnaud-lb
Add stack limit check to avoid stack overflows when trying to evaluate very large expressions.
This is similar to [the check in
zend_compile_expr()](https://github.com/php/php-src/blob/49fbbea2ea5fe1f6bab0719c95a46a119ea3d91f/Zend/zend_compile.c#L10516),
but instead of bailing out, we can just skip evaluation (although this still bailouts afterwards if
the expression is compiled).