mirror of
https://github.com/php/php-src.git
synced 2026-04-24 08:28:26 +02:00
MFB: Fixed bug #1713 (possible crash inside tidy_get_error_buffer()).
This commit is contained in:
+5
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user