mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Fixed bug #54682 (Tidy::diagnose() NULL pointer dereference)
This commit is contained in:
parent
7cac52f58f
commit
bb6835f727
3 changed files with 18 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -27,6 +27,10 @@ PHP NEWS
|
|||
|
||||
- SOAP
|
||||
. Fixed bug #44686 (SOAP-ERROR: Parsing WSDL with references). (Dmitry)
|
||||
|
||||
- Tidy:
|
||||
. Fixed bug #54682 (Tidy::diagnose() NULL pointer dereference).
|
||||
(Maksymilian Arciemowicz, Felipe)
|
||||
|
||||
03 Nov 2011, PHP 5.3.9RC1
|
||||
|
||||
|
|
13
ext/tidy/tests/bug54682.phpt
Normal file
13
ext/tidy/tests/bug54682.phpt
Normal file
|
@ -0,0 +1,13 @@
|
|||
--TEST--
|
||||
Tidy::diagnose() NULL pointer dereference
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("tidy")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$nx = new Tidy("*");
|
||||
$nx->diagnose();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: tidy::__construct(): Cannot Load '*' into memory in %s on line %d
|
|
@ -1288,7 +1288,7 @@ static PHP_FUNCTION(tidy_diagnose)
|
|||
{
|
||||
TIDY_FETCH_OBJECT;
|
||||
|
||||
if (tidyRunDiagnostics(obj->ptdoc->doc) >= 0) {
|
||||
if (tidyStatus(obj->ptdoc->doc) != 0 && tidyRunDiagnostics(obj->ptdoc->doc) >= 0) {
|
||||
tidy_doc_update_properties(obj TSRMLS_CC);
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue