php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35629 http:// wrapper crashes with redirections
Submitted: 2005-12-11 04:23 UTC Modified: 2005-12-12 06:05 UTC
Votes:2
Avg. Score:2.0 ± 1.0
Reproduced:0 of 1 (0.0%)
From: marius at joy2share dot com Assigned: iliaa (profile)
Status: Closed Package: Filesystem function related
PHP Version: 5CVS-2005-12-12 (cvs) OS: *
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: marius at joy2share dot com
New email:
PHP Version: OS:

 

 [2005-12-11 04:23 UTC] marius at joy2share dot com
Description:
------------
[Sun Dec 11 05:03:00 2005] [notice] child pid 12388 exit signal Segmentation fault (11)

The script below worked fine with PHP 5.0.5.

I have : Apache/2.2.0 PHP/5.1.1 configured on my system.

Reproduce code:
---------------
<?php
error_reporting(E_ALL);
$link="http://www.amazon.com/exec/obidos/tg/detail/-/0131867164/ref=pd_sbs_b_2/002-9050535-1556846?%5Fencoding=UTF8&v=glance";
$f = file($link);
?>

Expected result:
----------------
$f will contain an array with that file.

Actual result:
--------------
[Sun Dec 11 05:03:00 2005] [notice] child pid 12388 exit signal Segmentation fault (11)

And I get the file with the code mentioned above for download.
The file is empty.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-11 22:22 UTC] marius at joy2share dot com
gdb backtrace :

(gdb) bt
#0  0xb7d77218 in php_stream_url_wrap_http_ex (wrapper=0x81ea440,
    path=0xbfbbcbe4 "http://www.amazon.com/exec/obidos/tg/detail/-/0131867164/ref=pd_sbs_b_2/002-4279985-3370440?%5Fencoding=UTF8&v=glance", mode=0xb7e81808 "rb", options=4, opened_path=0x0, context=0x82341f4, redirect_max=19, header_init=0,
    __php_stream_call_depth=0, __zend_filename=0xb7eaed18 "/share2/php5.1-200512111530/ext/standard/http_fopen_wrapper.c",
    __zend_lineno=643, __zend_orig_filename=0x0, __zend_orig_lineno=0)
    at /share2/php5.1-200512111530/ext/standard/http_fopen_wrapper.c:648
#1  0xb7d77132 in php_stream_url_wrap_http_ex (wrapper=0x81ea440,
    path=0x823414c "http://www.amazon.com/exec/obidos/tg/detail/-/0131867164/ref=pd_sbs_b_2/002-9050535-1556846?%5Fencoding=UTF8&v=glance", mode=0xb7e81808 "rb", options=Variable "options" is not available.
) at /share2/php5.1-200512111530/ext/standard/http_fopen_wrapper.c:643
#2  0xb7d786f7 in php_stream_url_wrap_http (wrapper=0x81ea440,
    path=0x823414c "http://www.amazon.com/exec/obidos/tg/detail/-/0131867164/ref=pd_sbs_b_2/002-9050535-1556846?%5Fencoding=UTF8&v=glance", mode=0xb7e81808 "rb", options=4, opened_path=0x0, context=0x82341f4, __php_stream_call_depth=1,
    __zend_filename=0xb7eb478c "/share2/php5.1-200512111530/main/streams/streams.c", __zend_lineno=1773,
    __zend_orig_filename=0xb7ea77d4 "/share2/php5.1-200512111530/ext/standard/file.c", __zend_orig_lineno=701)
    at /share2/php5.1-200512111530/ext/standard/http_fopen_wrapper.c:703
#3  0xb7da9610 in _php_stream_open_wrapper_ex (
    path=0x823414c "http://www.amazon.com/exec/obidos/tg/detail/-/0131867164/ref=pd_sbs_b_2/002-9050535-1556846?%5Fencoding=UTF8&v=glance", mode=0xb7e81808 "rb", options=4, opened_path=0x0, context=0x82341f4, __php_stream_call_depth=0,
    __zend_filename=0xb7ea77d4 "/share2/php5.1-200512111530/ext/standard/file.c", __zend_lineno=701, __zend_orig_filename=Variable "__zend_orig_filename" is not available.
)
    at /share2/php5.1-200512111530/main/streams/streams.c:1771
#4  0xb7d2be29 in zif_file (ht=1, return_value=0x823b824, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
    at /share2/php5.1-200512111530/ext/standard/file.c:701
#5  0xb7dfeba6 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfbbd740)
    at /share2/php5.1-200512111530/Zend/zend_vm_execute.h:192
#6  0xb7dfe1a1 in execute (op_array=0x8233f2c) at /share2/php5.1-200512111530/Zend/zend_vm_execute.h:92
#7  0xb7ddc205 in zend_execute_scripts (type=8, retval=Variable "retval" is not available.
) at /share2/php5.1-200512111530/Zend/zend.c:1101
#8  0xb7d9386b in php_execute_script (primary_file=0xbfbbfa84) at /share2/php5.1-200512111530/main/main.c:1720
#9  0xb7e7f153 in php_handler (r=0x8219200) at /share2/php5.1-200512111530/sapi/apache2handler/sapi_apache2.c:584
#10 0x08076c6c in ap_run_handler ()
#11 0x080795f0 in ap_invoke_handler ()
#12 0x080997de in ap_process_request ()
#13 0x080961cf in ap_process_http_connection ()
#14 0x0807dedb in ap_run_process_connection ()
#15 0x0807e257 in ap_process_connection ()
#16 0x080b64f5 in child_main ()
#17 0x080b6814 in make_child ()
---Type <return> to continue, or q <return> to quit---
#18 0x080b6f7e in ap_mpm_run ()
#19 0x080624df in main ()
(gdb)
 [2005-12-11 23:14 UTC] sniper@php.net
Verified and assigned to the streams mastah.
 [2005-12-12 06:05 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC