|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56039 Tidy::root() dumps core
Submitted: 2004-04-20 12:40 UTC Modified: 2005-09-16 20:30 UTC
From: adam at trachtenberg dot com Assigned: john (profile)
Status: Closed Package: tidy (PECL)
PHP Version: 5CVS-2004-04-20 (dev) OS: Mac OS X 10.3.3
Private report: No CVE-ID: None
 [2004-04-20 12:40 UTC] adam at trachtenberg dot com
The script tidy/examples/dumpit5.php script is crashing on $tidy->root();

Reproduce code:
./sapi/cli/php ext/tidy/examples/dumpit5.php

Expected result:
No crash.

Actual result:
#0  0x002a33b4 in tidy_add_default_properties (obj=0xf20b38, 
type=is_node) at /Users/adam/cvs/php-src/ext/tidy/tidy.c:715
715                             buf.bp[buf.size-1] = '\0';
(gdb) bt
#0  0x002a33b4 in tidy_add_default_properties (obj=0xf20b38, 
type=is_node) at /Users/adam/cvs/php-src/ext/tidy/tidy.c:715
#1  0x002a3e58 in php_tidy_create_node (ht=0, 
return_value=0xdc2478, this_ptr=0xdbdde8, return_value_used=1, 
node=is_root_node) at /Users/adam/cvs/php-src/ext/tidy/tidy.c:847
#2  0x002a70d8 in zif_tidy_get_root (ht=0, return_value=0xdc2478, 
this_ptr=0xdbdde8, return_value_used=1) at /Users/adam/cvs/php-src/
#3  0x00361ea4 in zend_do_fcall_common_helper 
(execute_data=0xbfffebf0, opline=0xdbc2b4, op_array=0xdbbdc8) at /
#4  0x003626bc in zend_do_fcall_by_name_handler 
(execute_data=0xbfffebf0, opline=0xdbc2b4, op_array=0xdbbdc8) at /
#5  0x0035c818 in execute (op_array=0xdbbdc8) at /Users/adam/cvs/
#6  0x0032b9e0 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /Users/adam/cvs/php-src/Zend/zend.c:1058
#7  0x002ca1b4 in php_execute_script (primary_file=0xbffff660) at /
#8  0x0036f5c0 in main (argc=3, argv=0xbffffbc8) at /Users/adam/cvs/


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-17 07:43 UTC] nlopess at -php dot net
HEAD works fine.
 [2005-06-17 16:55 UTC]
Give HEAD a try Adam and let me know..
 [2005-09-16 20:30 UTC] adam at trachtenberg dot com
This is now fixed.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Aug 09 13:05:45 2022 UTC