Commit 7ecc6a7d authored by Matthias Klumpp's avatar Matthias Klumpp
Browse files

Catch out-of-context XML reading errors again

parent 3383e1e3
...@@ -337,7 +337,7 @@ as_xml_add_description_node_helper (AsContext *ctx, xmlNode *root, xmlNode **des ...@@ -337,7 +337,7 @@ as_xml_add_description_node_helper (AsContext *ctx, xmlNode *root, xmlNode **des
doc = xmlReadMemory (xmldata, strlen (xmldata), doc = xmlReadMemory (xmldata, strlen (xmldata),
NULL, NULL,
"utf-8", "utf-8",
XML_PARSE_NOBLANKS | XML_PARSE_NONET | XML_PARSE_BIG_LINES); XML_PARSE_NOBLANKS | XML_PARSE_NONET);
if (doc == NULL) { if (doc == NULL) {
ret = FALSE; ret = FALSE;
goto out; goto out;
...@@ -571,7 +571,7 @@ libxml_generic_error (gchar **error_str_ptr, const char *format, ...) ...@@ -571,7 +571,7 @@ libxml_generic_error (gchar **error_str_ptr, const char *format, ...)
va_end (arg_ptr); va_end (arg_ptr);
g_free (error_str); g_free (error_str);
error_str = g_string_free (str, FALSE); *error_str_ptr = g_string_free (str, FALSE);
g_mutex_unlock (&mutex); g_mutex_unlock (&mutex);
} }
...@@ -616,7 +616,7 @@ as_xml_parse_document (const gchar *data, gssize len, GError **error) ...@@ -616,7 +616,7 @@ as_xml_parse_document (const gchar *data, gssize len, GError **error)
doc = xmlReadMemory (data, len, doc = xmlReadMemory (data, len,
NULL, NULL,
"utf-8", "utf-8",
XML_PARSE_NOBLANKS | XML_PARSE_NONET); XML_PARSE_NOBLANKS | XML_PARSE_NONET | XML_PARSE_BIG_LINES);
if (doc == NULL) { if (doc == NULL) {
if (error_msg_str == NULL) { if (error_msg_str == NULL) {
g_set_error (error, g_set_error (error,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment