summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2014-01-05 13:16:55 (GMT)
committerSjoerd Simons <sjoerd@luon.net>2014-01-05 13:16:58 (GMT)
commit734af806917d67dada9fc591da1673edfe1a8cdd (patch)
tree88f8e7d6cb432d9762529ac332318feb8b527736
parentd7183392266bed1ef23ce929fe4fdc59bc577865 (diff)
downloadtelepathy-logger-734af806917d67dada9fc591da1673edfe1a8cdd.tar.gz
Ask libxml2 to recover from errors of possible
Let libxml2 try and recover on parse error instead to avoid crashes in case logs can't be parsed fully. Works around https://bugs.freedesktop.org/show_bug.cgi?id=40675
-rw-r--r--telepathy-logger/log-store-xml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c
index fc2fbfd..c050224 100644
--- a/telepathy-logger/log-store-xml.c
+++ b/telepathy-logger/log-store-xml.c
@@ -1365,7 +1365,7 @@ log_store_xml_get_events_for_file (TplLogStoreXml *self,
ctxt = xmlNewParserCtxt ();
/* Parse and validate the file. */
- doc = xmlCtxtReadFile (ctxt, filename, NULL, 0);
+ doc = xmlCtxtReadFile (ctxt, filename, NULL, XML_PARSE_RECOVER);
if (!doc)
{
g_warning ("Failed to parse file:'%s'", filename);