mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
7d483418e2
This was doing a plain copy of JMPZNZ, even though it encodes offsets relative to the opline. As such, the offsets would be relative to target, while they should be relative to opline. Fix this by recomputing them. Fixes oss-fuzz #39295.
17 lines
232 B
PHP
17 lines
232 B
PHP
--TEST--
|
|
Check for correct treatment of relative JMPZNZ offsets when copying opline
|
|
--FILE--
|
|
<?php
|
|
function test($c) {
|
|
L1:
|
|
if ($c) {
|
|
goto L1;
|
|
goto L1;
|
|
}
|
|
}
|
|
test(false);
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|