Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > 6709f41e1c9c0ac6e610e609c299d4fb > files > 26

libxml2-2.6.26-2.1.12.el5_7.2.src.rpm

commit 77fbc3ea90852f746710858d6e8c25ac3852b2e1
Author: Daniel Veillard <veillard@src.gnome.org>
Date:   Mon Mar 24 14:06:19 2008 +0000

    fix an XML Schemas crash raised by Stefan Behnel when testing with W3C
    
    * xmlschemas.c: fix an XML Schemas crash raised by Stefan Behnel
      when testing with W3C test suite
    Daniel
    
    svn path=/trunk/; revision=3712

diff --git a/xmlschemas.c b/xmlschemas.c
index 13c22ca..01a9c3c 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -21808,9 +21808,9 @@ xmlSchemaValidateNotation(xmlSchemaValidCtxtPtr vctxt,
 		return (1);
 	    }
 	    if (xmlSchemaGetNotation(schema, localName, nsName) != NULL) {
-		if (valNeeded && (val != NULL)) {
-		    (*val) = xmlSchemaNewNOTATIONValue(BAD_CAST localName,
-			BAD_CAST xmlStrdup(nsName));
+		if ((valNeeded) && (val != NULL)) {
+		    (*val) = xmlSchemaNewNOTATIONValue(xmlStrdup(localName),
+						       xmlStrdup(nsName));
 		    if (*val == NULL)
 			ret = -1;
 		}