Index: third_party/libxml/src/relaxng.c |
diff --git a/third_party/libxml/src/relaxng.c b/third_party/libxml/src/relaxng.c |
index 5779e7fc5f49e2b99c60f7ceb141ef1b79536825..56a3344a2fe1a198d23a11fdf6678b58b6719d85 100644 |
--- a/third_party/libxml/src/relaxng.c |
+++ b/third_party/libxml/src/relaxng.c |
@@ -507,7 +507,7 @@ xmlRngVErrMemory(xmlRelaxNGValidCtxtPtr ctxt, const char *extra) |
* |
* Handle a Relax NG Parsing error |
*/ |
-static void |
+static void LIBXML_ATTR_FORMAT(4,0) |
xmlRngPErr(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, int error, |
const char *msg, const xmlChar * str1, const xmlChar * str2) |
{ |
@@ -541,7 +541,7 @@ xmlRngPErr(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node, int error, |
* |
* Handle a Relax NG Validation error |
*/ |
-static void |
+static void LIBXML_ATTR_FORMAT(4,0) |
xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error, |
const char *msg, const xmlChar * str1, const xmlChar * str2) |
{ |
@@ -2215,7 +2215,8 @@ xmlRelaxNGGetErrorString(xmlRelaxNGValidErr err, const xmlChar * arg1, |
snprintf(msg, 1000, "Unknown error code %d\n", err); |
} |
msg[1000 - 1] = 0; |
- return (xmlStrdup((xmlChar *) msg)); |
+ xmlChar *result = xmlCharStrdup(msg); |
+ return (xmlEscapeFormatString(&result)); |
} |
/** |