diff options
| author | Thibault "bui" Koechlin | 2018-01-26 18:35:40 +0100 |
|---|---|---|
| committer | jvoisin | 2018-01-26 18:35:40 +0100 |
| commit | c853c3fcc7ba2efbf78ef80b46dddda57d132510 (patch) | |
| tree | 918e818e8b3d5337999fdd4ba44a57c140bf7b67 /src/tests | |
| parent | a5b0956aa6bf91912dd8127b9b5e9f76f7f4730e (diff) | |
Fix a segfault in `get_local_var` (#138)
This commit fixes a segfault where 'get_local_var' would fail if no functions where called yet (`symtable` will be NULL)
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/disabled_function_local_var_crash.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/disabled_function_local_var_crash.phpt b/src/tests/disabled_function_local_var_crash.phpt new file mode 100644 index 0000000..8dec946 --- /dev/null +++ b/src/tests/disabled_function_local_var_crash.phpt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions - match on a local variable | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/disabled_function_local_var.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | function test(){ | ||
| 10 | echo strlen("id") . "\n"; | ||
| 11 | } | ||
| 12 | ob_start(test()); | ||
| 13 | echo "test\n"; | ||
| 14 | ?> | ||
| 15 | --EXPECTF-- | ||
| 16 | 2 | ||
| 17 | test | ||
| 18 | |||
