|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-12-23 03:00 UTC] sqchen at citiz dot net
Description:
------------
stream_filter_append($fp, "string.rot13", -49)
will cause Segmentation fault
Reproduce code:
---------------
<?php
$fp = fopen("test.txt", "w");
stream_filter_append($fp, "string.rot13", -49);
fwrite($fp, "This is a test\n");
rewind($fp);
fpassthru($fp);
fclose($fp);
?>
Actual result:
--------------
Segmentation fault
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 18:00:01 2025 UTC |
(gdb) bt #0 0x00002aaaab5433f0 in memcpy () from /lib64/tls/libc.so.6 #1 0x0000000000000003 in ?? () #2 0x000000000071ca50 in php_register_internal_extensions () #3 0x000000000062acfa in strfilter_rot13_filter (stream=0xaa6fc0, thisfilter=0xaa7360, buckets_in=0x7fffffc21d60, buckets_out=0x7fffffc21d50, bytes_consumed=0x0, flags=0) at /local/local/bodegon/php-debug/ext/standard/filters.c:46 #4 0x000000000065e69d in php_stream_fill_read_buffer (stream=0xaa6fc0, size=8192) at /local/local/bodegon/php-debug/main/streams/streams.c:458 #5 0x000000000065ecfa in _php_stream_read (stream=0xaa6fc0, buf=0x7fffffc21e70 "", size=8192) at /local/local/bodegon/php-debug/main/streams/streams.c:584 #6 0x00000000006602d2 in _php_stream_passthru (stream=0xaa6fc0, __php_stream_call_depth=0, __zend_filename=0x762ae0 "/local/local/bodegon/php-debug/ext/standard/file.c", __zend_lineno=1487, __zend_orig_filename=0x0, __zend_orig_lineno=0) at /local/local/bodegon/php-debug/main/streams/streams.c:1183 #7 0x00000000005ca9ff in zif_fpassthru (ht=1, return_value=0xaa4f90, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /local/local/bodegon/php-debug/ext/standard/file.c:1487 #8 0x00000000006c2ef2 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffffc241a0) at zend_vm_execute.h:192 #9 0x00000000006c8e57 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x7fffffc241a0) at zend_vm_execute.h:1587 #10 0x00000000006c2a66 in execute (op_array=0xaa5e70) at zend_vm_execute.h:92 #11 0x000000000069ce03 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /local/local/bodegon/php-debug/Zend/zend.c:1101 #12 0x0000000000649cd3 in php_execute_script (primary_file=0x7fffffc26830) at /local/local/bodegon/php-debug/main/main.c:1720 #13 0x000000000071bd3d in main (argc=2, argv=0x7fffffc26a28) at /local/local/bodegon/php-debug/sapi/cli/php_cli.c:1077