summaryrefslogtreecommitdiff
path: root/ext/smoothstreaming
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2017-11-21 15:33:57 +0100
committerEdward Hervey <bilboed@bilboed.com>2017-11-21 15:33:57 +0100
commit6e1e87d403e753b76d8b084ffd434ea98d5c7ef8 (patch)
treeb59a4cbfeada66bbb6025f318c60841f232e1162 /ext/smoothstreaming
parent26108d829b86f137e73e85afb0988ff2ce7536cc (diff)
downloadgstreamer-plugins-bad-6e1e87d403e753b76d8b084ffd434ea98d5c7ef8.tar.gz
smoothstreaming: Handle invalid XML
Nothing guarantees the manifest is valid and will return a root node
Diffstat (limited to 'ext/smoothstreaming')
-rw-r--r--ext/smoothstreaming/gstmssmanifest.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c
index 2085b364d..c855cb387 100644
--- a/ext/smoothstreaming/gstmssmanifest.c
+++ b/ext/smoothstreaming/gstmssmanifest.c
@@ -354,6 +354,11 @@ gst_mss_manifest_new (GstBuffer * data)
manifest->xml = xmlReadMemory ((const gchar *) mapinfo.data,
mapinfo.size, "manifest", NULL, 0);
root = manifest->xmlrootnode = xmlDocGetRootElement (manifest->xml);
+ if (root == NULL) {
+ GST_WARNING ("No root node ! Invalid manifest");
+ gst_mss_manifest_free (manifest);
+ return NULL;
+ }
live_str = (gchar *) xmlGetProp (root, (xmlChar *) "IsLive");
if (live_str) {