From:             riverfr0zen at elitemail dot org
Operating system: Linux 2.6.15-28-386 UbuntuDappr
PHP version:      4.4.7
PHP Bug Type:     XML related
Bug description:  xml_get_current_line_number() causes segmentation fault

Description:
------------
It seems bug # 20442 has crept in again.

Calling xml_get_current_line_number() to report the line number of an xml
parsing error causes a segmentation fault.

(Tested on the following feed (which causes a 'not well-formed (invalid
token)' error at time of reporting)
http://feeds.feedburner.com/thr/film

The code below is run from the CLI.



Reproduce code:
---------------
                                while ($data = fread($feed, 4096)) {
                                        if (xml_parse($this->parser, $data, 
feof($feed)) !== 1)
                                        {
                                                print 
xml_error_string(xml_get_error_code($this->parser)) . "\n";
                                                print 
xml_get_current_line_number($this->parser) . "\n";
                                        }
                                }


Expected result:
----------------
not well-formed (invalid token)
(the line number)


Actual result:
--------------
Segmentation fault

-- 
Edit bug report at http://bugs.php.net/?id=41613&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41613&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41613&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41613&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41613&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41613&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41613&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41613&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41613&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41613&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41613&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41613&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41613&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41613&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41613&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41613&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41613&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41613&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41613&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41613&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41613&r=mysqlcfg

Reply via email to