mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
MFB: Fixed bug #1713 (possible crash inside tidy_get_error_buffer()).
This commit is contained in:
parent
476c9a3b3d
commit
e4e71fd8ba
1 changed files with 5 additions and 1 deletions
|
@ -1042,7 +1042,11 @@ PHP_FUNCTION(tidy_get_error_buffer)
|
|||
{
|
||||
TIDY_FETCH_OBJECT;
|
||||
|
||||
RETURN_STRING(obj->ptdoc->errbuf->bp, 1);
|
||||
if (obj->ptdoc->errbuf && obj->ptdoc->errbuf->bp) {
|
||||
RETURN_STRING(obj->ptdoc->errbuf->bp, 1);
|
||||
} else {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue