Edit report at https://bugs.php.net/bug.php?id=56127&edit=1

 ID:                 56127
 Updated by:         fel...@php.net
 Reported by:        m...@php.net
 Summary:            Segmentation Fault when using tidy_repair_string
                     with Curl
-Status:             Open
+Status:             Closed
 Type:               Bug
-Package:            tidy
+Package:            *General Issues
 Operating System:   Linux
 PHP Version:        5CVS-2004-07-11 (dev)
-Assigned To:        
+Assigned To:        felipe
 Block user comment: N
 Private report:     N

 New Comment:

Looks as this old problem is already fixed. :)


Previous Comments:
------------------------------------------------------------------------
[2004-07-11 07:50:23] m...@php.net

Description:
------------
Passing the return value of curl_exec() to tidy_repair_string() causes a 
segmentation fault. I'm using Curl 7.12.0 and the latest tidylib version from 
tidy.sf.net.

See below for the code and a backtrace.

Reproduce code:
---------------
<?php
$ch = curl_init("http://php.net/";);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$str = curl_exec($ch);
curl_close($ch);

echo tidy_repair_string($str);

Actual result:
--------------
#0  0x0820c3f0 in php_tidy_quick_repair (ht=1, return_value=0x83f3bec, 
this_ptr=0x0, return_value_used=1, is_file=0 '\0') at 
/home/martin/cvs/php-src/ext/tidy/tidy.c:432
#1  0x0820ef5d in zif_tidy_repair_string (ht=1, return_value=0x83f3bec, 
this_ptr=0x0, return_value_used=1) at 
/home/martin/cvs/php-src/ext/tidy/tidy.c:1126
#2  0x082a167c in zend_do_fcall_common_helper (execute_data=0xbfffd6bc, 
opline=0x8404d88, op_array=0x840052c) at 
/home/martin/cvs/php-src/Zend/zend_execute.c:2699
#3  0x082a1e49 in zend_do_fcall_handler (execute_data=0xbfffd6bc, 
opline=0x8404d88, op_array=0x840052c) at 
/home/martin/cvs/php-src/Zend/zend_execute.c:2828
#4  0x0829d5bb in execute (op_array=0x840052c) at 
/home/martin/cvs/php-src/Zend/zend_execute.c:1391
#5  0x08276cb4 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at 
/home/martin/cvs/php-src/Zend/zend.c:1061
#6  0x0822aebf in php_execute_script (primary_file=0xbffffa60) at 
/home/martin/cvs/php-src/main/main.c:1627
#7  0x082ac20f in main (argc=3, argv=0xbffffae4) at 
/home/martin/cvs/php-src/sapi/cli/php_cli.c:943



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=56127&edit=1

Reply via email to