[gupnp] [PATCH] be more lenient when parsing DIDL-Lite XML fragments



Moin,

attached is a trival patch that changes the DIDL-Lite parser to deal
better with slightly broken XML fragments. This is similar to the
changes we have applied in libgupnp a while ago.


Sven


>From 6c7801c47e380f03bcfeab06693d2b18e12c9904 Mon Sep 17 00:00:00 2001
From: Sven Neumann <s neumann phase-zero de>
Date: Tue, 24 Mar 2009 12:12:42 +0100
Subject: [PATCH] be more lenient when parsing DIDL-Lite XML fragments

---
 libgupnp-av/gupnp-didl-lite-parser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libgupnp-av/gupnp-didl-lite-parser.c b/libgupnp-av/gupnp-didl-lite-parser.c
index 99f5abf..a5a1f68 100644
--- a/libgupnp-av/gupnp-didl-lite-parser.c
+++ b/libgupnp-av/gupnp-didl-lite-parser.c
@@ -98,7 +98,7 @@ gupnp_didl_lite_parser_parse_didl
         xmlDoc  *doc;
         xmlNode *element;
 
-        doc = xmlParseMemory (didl, strlen (didl));
+        doc = xmlRecoverMemory (didl, strlen (didl));
 	if (doc == NULL) {
                 g_set_error (error,
                              GUPNP_SERVER_ERROR,
-- 
1.5.6.3



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]