From:             [EMAIL PROTECTED]
Operating system: 
PHP version:      5.3CVS-2008-09-11 (CVS)
PHP Bug Type:     Unknown/Other Function
Bug description:  Tidy crashes when no document is supplied

Description:
------------
See below.

Reproduce code:
---------------
1)

<?php

$x = new tidynode;
$x->getparent();

---
2)

<?php

$x = new tidy;
$x->diagnose();

---
etc



Actual result:
--------------
1)
==32570== Invalid read of size 4
==32570==    at 0x41823CE: tidyGetParent (in
/usr/lib/libtidy-0.99.so.0.0.0)
==32570==    by 0x838679D: zif_tnm_getParent (tidy.c:1803)
==32570==    by 0x845468F: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:315)
==32570==    by 0x84427B2: execute (zend_vm_execute.h:104)
==32570==    by 0x841CC2E: zend_execute_scripts (zend.c:1197)
==32570==    by 0x83C22CC: php_execute_script (main.c:2075)
==32570==    by 0x84B4C0C: main (php_cli.c:1130)
==32570==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==32570== 
==32570== Process terminating with default action of signal 11 (SIGSEGV)
==32570==  Access not within mapped region at address 0x0
==32570==    at 0x41823CE: tidyGetParent (in
/usr/lib/libtidy-0.99.so.0.0.0)
==32570==    by 0x838679D: zif_tnm_getParent (tidy.c:1803)
==32570==    by 0x845468F: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:315)
==32570==    by 0x84427B2: execute (zend_vm_execute.h:104)
==32570==    by 0x841CC2E: zend_execute_scripts (zend.c:1197)
==32570==    by 0x83C22CC: php_execute_script (main.c:2075)
==32570==    by 0x84B4C0C: main (php_cli.c:1130)


2)
==32580== Invalid read of size 4
==32580==    at 0x4179D53: ReportMarkupVersion (in
/usr/lib/libtidy-0.99.so.0.0.0)
==32580==    by 0x41819AC: tidyDocRunDiagnostics (in
/usr/lib/libtidy-0.99.so.0.0.0)
==32580==    by 0x41819DC: tidyRunDiagnostics (in
/usr/lib/libtidy-0.99.so.0.0.0)
==32580==    by 0x8386428: zif_tidy_diagnose (tidy.c:1319)
==32580==    by 0x845468F: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:315)
==32580==    by 0x84427B2: execute (zend_vm_execute.h:104)
==32580==    by 0x841CC2E: zend_execute_scripts (zend.c:1197)
==32580==    by 0x83C22CC: php_execute_script (main.c:2075)
==32580==    by 0x84B4C0C: main (php_cli.c:1130)
==32580==  Address 0x1C is not stack'd, malloc'd or (recently) free'd
==32580== 
==32580== Process terminating with default action of signal 11 (SIGSEGV)
==32580==  Access not within mapped region at address 0x1C
==32580==    at 0x4179D53: ReportMarkupVersion (in
/usr/lib/libtidy-0.99.so.0.0.0)
==32580==    by 0x41819AC: tidyDocRunDiagnostics (in
/usr/lib/libtidy-0.99.so.0.0.0)
==32580==    by 0x41819DC: tidyRunDiagnostics (in
/usr/lib/libtidy-0.99.so.0.0.0)
==32580==    by 0x8386428: zif_tidy_diagnose (tidy.c:1319)
==32580==    by 0x845468F: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:315)
==32580==    by 0x84427B2: execute (zend_vm_execute.h:104)
==32580==    by 0x841CC2E: zend_execute_scripts (zend.c:1197)
==32580==    by 0x83C22CC: php_execute_script (main.c:2075)
==32580==    by 0x84B4C0C: main (php_cli.c:1130)



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

Reply via email to