exit in stream filter produces segfault
| Bug #66182 | exit in stream filter produces segfault | ||||
|---|---|---|---|---|---|
| Submitted: | 2013-11-26 23:51 UTC | Modified: | - | ||
| From: | igor at wiedler dot ch | Assigned: | |||
| Status: | Closed | Package: | Streams related | ||
| PHP Version: | 5.5.6 | OS: | |||
| Private report: | No | CVE-ID: | None | ||
[2013-11-26 23:51 UTC] igor at wiedler dot ch
Description:
------------
An exit statement inside the implementation of a custom stream filter results in a segmentation fault.
I don't have gdb on this machine, so cannot provide a stack trace. But it's quite easy to reproduce.
Test script:
---------------
<?php
class before_body_foo_filter extends php_user_filter
{
function filter($in, $out, &$consumed, $closing)
{
// this exit; causes a segfault
exit;
}
}
stream_filter_register('before_body_foo', 'before_body_foo_filter');
$fp = fopen('php://output', 'w');
stream_filter_append($fp, 'before_body_foo', STREAM_FILTER_WRITE, 'YES');
fwrite($fp, 'hello');
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2014-04-03 07:10 UTC] mike@php.net
-Status: Open +Status: Closed