From 734af806917d67dada9fc591da1673edfe1a8cdd Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Sun, 5 Jan 2014 14:16:55 +0100 Subject: [PATCH] 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 --- telepathy-logger/log-store-xml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 1.8.5.2