|
| 1 | +diff -Naur libxml2-2.9.4.orig/relaxng.c libxml2-2.9.4/relaxng.c |
| 2 | +--- libxml2-2.9.4.orig/relaxng.c2017-01-31 12:30:32.964119994 +0300 |
| 3 | ++++ libxml2-2.9.4/relaxng.c2017-01-31 12:34:57.196114129 +0300 |
| 4 | +@@ -2088,6 +2088,7 @@ |
| 5 | + const xmlChar * arg2) |
| 6 | + { |
| 7 | + char msg[1000]; |
| 8 | ++ xmlChar *result = NULL; |
| 9 | + |
| 10 | + if (arg1 == NULL) |
| 11 | + arg1 = BAD_CAST ""; |
| 12 | +@@ -2215,7 +2216,7 @@ |
| 13 | + snprintf(msg, 1000, "Unknown error code %d\n", err); |
| 14 | + } |
| 15 | + msg[1000 - 1] = 0; |
| 16 | +- xmlChar *result = xmlCharStrdup(msg); |
| 17 | ++ result = xmlCharStrdup(msg); |
| 18 | + return (xmlEscapeFormatString(&result)); |
| 19 | + } |
| 20 | + |
| 21 | +diff -Naur libxml2-2.9.4.orig/xmlschemas.c libxml2-2.9.4/xmlschemas.c |
| 22 | +--- libxml2-2.9.4.orig/xmlschemas.c2017-01-31 12:30:32.964119994 +0300 |
| 23 | ++++ libxml2-2.9.4/xmlschemas.c2017-01-31 12:34:20.700114939 +0300 |
| 24 | +@@ -3121,6 +3121,7 @@ |
| 25 | + const xmlChar *str2) |
| 26 | + { |
| 27 | + xmlChar *msg = NULL; |
| 28 | ++ xmlChar *expectedEscaped = NULL; |
| 29 | + |
| 30 | + xmlSchemaFormatNodeForError(&msg, ACTXT_CAST ctxt, node); |
| 31 | + if (message == NULL) { |
| 32 | +@@ -3169,7 +3170,7 @@ |
| 33 | + } |
| 34 | + if (expected) { |
| 35 | + msg = xmlStrcat(msg, BAD_CAST " Expected is '"); |
| 36 | +- xmlChar *expectedEscaped = xmlCharStrdup(expected); |
| 37 | ++ expectedEscaped = xmlCharStrdup(expected); |
| 38 | + msg = xmlStrcat(msg, xmlEscapeFormatString(&expectedEscaped)); |
| 39 | + FREE_AND_NULL(expectedEscaped); |
| 40 | + msg = xmlStrcat(msg, BAD_CAST "'.\n"); |