diff options
author | Sjoerd Simons <sjoerd@luon.net> | 2014-01-05 14:16:55 +0100 |
---|---|---|
committer | Debarshi Ray <debarshir@gnome.org> | 2015-04-21 11:58:47 +0200 |
commit | e10061d2a8708a70cab902dd8f65c4dd4e663930 (patch) | |
tree | dda4ebc0d00f11359ca3c750f69f667f3b2dd8d0 | |
parent | f9fd20b9305a7aa31c2573b616c8bd77d8d25cd2 (diff) | |
download | telepathy-logger-e10061d2a8708a70cab902dd8f65c4dd4e663930.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
(cherry picked from commit 734af806917d67dada9fc591da1673edfe1a8cdd)
-rw-r--r-- | telepathy-logger/log-store-xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c index 03f5d3c..3951c93 100644 --- a/telepathy-logger/log-store-xml.c +++ b/telepathy-logger/log-store-xml.c @@ -1370,7 +1370,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); |