From:             
Operating system: Linux
PHP version:      5.3.3
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Segmentation Fault with parse_http_headers()

Description:
------------
When running this script at the command line (php ./crash.php) I get a 

segmentation fault. 



To reproduce, save this to a script, run an instance of PHP with the
pecl_http 

extension installed, make popcorn. 

Test script:
---------------
<?php

$data = <<<DATA

HTTP/1.1 302

Date: Tue, 26 Oct 2010 14:53:04 GMT

Server: Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7d SE/0.5.3

X-Pingback: http://www.onefortybpm.com/xmlrpc.php

X-Powered-By: PHP/4.4.8

Location: http://www.onefortybpm.com/

Content-Length: 0

Connection: close

Content-Type: text/html; charset=UTF-8

DATA;

var_dump($data);

var_dump(http_parse_headers($data));



Expected result:
----------------
No seg fault

Actual result:
--------------
seg fault. 



-- 
Edit bug report at http://bugs.php.net/bug.php?id=53169&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53169&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53169&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53169&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53169&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53169&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53169&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53169&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53169&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53169&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53169&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53169&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53169&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53169&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53169&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53169&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53169&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53169&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53169&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53169&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53169&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53169&r=mysqlcfg

Reply via email to