Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ext/tidy/tidy.c
Original file line number Diff line number Diff line change
Expand Up @@ -965,18 +965,18 @@ static int php_tidy_output_handler(void **nothing, php_output_context *output_co
TidyBuffer inbuf, outbuf, errbuf;

if (TG(clean_output) && (output_context->op & PHP_OUTPUT_HANDLER_START) && (output_context->op & PHP_OUTPUT_HANDLER_FINAL)) {
if (ZEND_SIZE_T_UINT_OVFL(output_context->in.used)) {
php_error_docref(NULL, E_WARNING, "Input string is too long");
return status;
}

doc = tidyCreate();
tidyBufInit(&errbuf);

if (0 == tidySetErrorBuffer(doc, &errbuf)) {
tidyOptSetBool(doc, TidyForceOutput, yes);
tidyOptSetBool(doc, TidyMark, no);

if (ZEND_SIZE_T_UINT_OVFL(output_context->in.used)) {
php_error_docref(NULL, E_WARNING, "Input string is too long");
return status;
}

TIDY_SET_DEFAULT_CONFIG(doc);

tidyBufInit(&inbuf);
Expand Down
Loading