|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-16 00:25 UTC] felipe@php.net
[2011-11-16 00:25 UTC] felipe@php.net
-Status: Open
+Status: Closed
-Package: tidy
+Package: *General Issues
-Assigned To:
+Assigned To: felipe
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 27 06:00:01 2025 UTC |
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