File php-5.3.5-CVE-2012-0781.patch of Package php5.512

http://svn.php.net/viewvc?view=revision&revision=319254
--- ext/tidy/tidy.c	2011/11/15 14:20:13	319253
+++ ext/tidy/tidy.c	2011/11/15 15:16:20	319254
@@ -1288,7 +1288,7 @@
 {
 	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;
 	}