libxml2 r3712 - trunk



Author: veillard
Date: Mon Mar 24 14:06:19 2008
New Revision: 3712
URL: http://svn.gnome.org/viewvc/libxml2?rev=3712&view=rev

Log:
* xmlschemas.c: fix an XML Schemas crash raised by Stefan Behnel
  when testing with W3C test suite
Daniel


Modified:
   trunk/ChangeLog
   trunk/xmlschemas.c

Modified: trunk/xmlschemas.c
==============================================================================
--- trunk/xmlschemas.c	(original)
+++ trunk/xmlschemas.c	Mon Mar 24 14:06:19 2008
@@ -21808,9 +21808,9 @@
 		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;
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]