[gupnp] Don't use xmlRecoverFile, use xmlReadFile
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] Don't use xmlRecoverFile, use xmlReadFile
- Date: Sun, 19 Aug 2012 14:13:13 +0000 (UTC)
commit a63f6149102576e967a4df3b625d25d53b2e86aa
Author: Jens Georg <mail jensge org>
Date: Sat Jun 30 21:13:26 2012 +0200
Don't use xmlRecoverFile, use xmlReadFile
xmlRecoverFile never errors out (returning a non-null file). So invalid
XML files can't be detected.
https://bugzilla.gnome.org/show_bug.cgi?id=679204
libgupnp/gupnp-xml-doc.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libgupnp/gupnp-xml-doc.c b/libgupnp/gupnp-xml-doc.c
index 6f83c0e..8d712a9 100644
--- a/libgupnp/gupnp-xml-doc.c
+++ b/libgupnp/gupnp-xml-doc.c
@@ -104,7 +104,9 @@ gupnp_xml_doc_new_from_path (const char *path,
xmlDoc *doc;
g_return_val_if_fail (path != NULL, NULL);
- doc = xmlRecoverFile (path);
+ doc = xmlReadFile (path,
+ NULL,
+ XML_PARSE_PEDANTIC);
if (doc == NULL) {
g_set_error (error,
GUPNP_XML_ERROR,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]