diff options
author | Edward Hervey <edward@centricular.com> | 2017-11-21 15:33:57 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2017-12-01 10:51:16 +0100 |
commit | 865de199f159df4a04d09f36e35f2e4520da4375 (patch) | |
tree | a91d46ca038d7550c08273f0f8378602c579416a /ext | |
parent | 2707d5cfa6856762615e88fd7c66137b2574f60e (diff) | |
download | gstreamer-plugins-bad-865de199f159df4a04d09f36e35f2e4520da4375.tar.gz |
smoothstreaming: Handle invalid XML
Nothing guarantees the manifest is valid and will return a root node
Diffstat (limited to 'ext')
-rw-r--r-- | ext/smoothstreaming/gstmssmanifest.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/smoothstreaming/gstmssmanifest.c b/ext/smoothstreaming/gstmssmanifest.c index fb1eb0df8..2370c7206 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) { |