components/libxml2/patches/bug684774.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 11 Mar 2013 10:38:09 -0700
branchs11-update
changeset 2520 ceec631e74d1
parent 2452 9dc4dfa4b04d
permissions -rw-r--r--
Close of build 10.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2452
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     1
See:
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     2
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     3
http://git.gnome.org/browse/libxml2/commit/?id=6c91aa384f48ff6d406553a6dd47fd556c1ef2e6
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     4
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     5
From 6c91aa384f48ff6d406553a6dd47fd556c1ef2e6 Mon Sep 17 00:00:00 2001
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     6
From: Daniel Veillard <[email protected]>
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     7
Date: Thu, 25 Oct 2012 07:33:59 +0000
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     8
Subject: Fix a regression in 2.9.0 breaking validation while streaming
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
     9
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    10
https://bugzilla.gnome.org/show_bug.cgi?id=684774
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    11
with help from Kjell Ahlstedt <[email protected]>
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    12
---
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    13
diff --git a/SAX2.c b/SAX2.c
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    14
index a24abc8..3eea39a 100644
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    15
--- a/SAX2.c
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    16
+++ b/SAX2.c
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    17
@@ -2202,7 +2202,7 @@ xmlSAX2StartElementNs(void *ctx,
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    18
 	  (ctxt->myDoc->intSubset->elements == NULL) &&
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    19
 	  (ctxt->myDoc->intSubset->attributes == NULL) &&
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    20
 	  (ctxt->myDoc->intSubset->entities == NULL)))) {
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    21
-	xmlErrValid(ctxt, XML_ERR_NO_DTD,
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    22
+	xmlErrValid(ctxt, XML_DTD_NO_DTD,
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    23
 	  "Validation failed: no DTD found !", NULL, NULL);
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    24
 	ctxt->validate = 0;
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    25
     }
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    26
diff --git a/parser.c b/parser.c
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    27
index 28b0d80..19f1217 100644
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    28
--- a/parser.c
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    29
+++ b/parser.c
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    30
@@ -11633,7 +11633,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    31
 			    "PP: Parsing internal subset\n");
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    32
 #endif
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    33
 		    ctxt->inSubset = 1;
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    34
-                    ctxt->progressive = 1;
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    35
+                    ctxt->progressive = 0;
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    36
 		    ctxt->checkIndex = 0;
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    37
 		    xmlParseDocTypeDecl(ctxt);
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    38
 		    if (RAW == '[') {
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    39
@@ -12219,7 +12219,10 @@ xmldecl_done:
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    40
 	}
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    41
 	ctxt->instate = XML_PARSER_EOF;
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    42
     }
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    43
-    return((xmlParserErrors) ctxt->errNo);
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    44
+    if (ctxt->wellFormed == 0)
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    45
+	return((xmlParserErrors) ctxt->errNo);
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    46
+    else
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    47
+        return(0);
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    48
 }
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    49
 
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    50
 /************************************************************************
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    51
--
9dc4dfa4b04d 15825143 SUNBT7206540 Upgrade libxml2 to version 2.9.0
Petr Sumbera <petr.sumbera@oracle.com>
parents:
diff changeset
    52
cgit v0.9.0.2