diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-04 22:42:14 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-04 22:42:14 +0200 |
commit | 239e2dda6487761271fa5258e642b716dd79a02b (patch) | |
tree | b7ca8728f68deda192f5b141c7c368ad2b31dffb /ext/mbstring/php_mbregex.c | |
parent | 1d6e9da7433bddca5c591ef5b2eeef9c410543bb (diff) | |
download | php-git-239e2dda6487761271fa5258e642b716dd79a02b.tar.gz |
Make sure T_ERROR is returned for all lexer exceptions
This originally manifested as a leak in oss-fuzz #18000. The following
is a reduced test case:
<?php
[
5 => 1,
"foo" > 1,
" " => "" == 0
];
<<<BAR
$x
BAR;
Because this particular error condition did not return T_ERROR,
EG(exception) was set while performing binary operation constant
evaluation, which checks exceptions for cast failures.
Instead of adding this indirect test case, I'm adding an assertion
that the lexer has to return T_ERROR if EG(exception) is set.
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
0 files changed, 0 insertions, 0 deletions