projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26108d8
)
smoothstreaming: Handle invalid XML
author
Edward Hervey
<edward@centricular.com>
Tue, 21 Nov 2017 14:33:57 +0000
(15:33 +0100)
committer
Edward Hervey
<bilboed@bilboed.com>
Tue, 21 Nov 2017 14:33:57 +0000
(15:33 +0100)
Nothing guarantees the manifest is valid and will return a root node
ext/smoothstreaming/gstmssmanifest.c
patch
|
blob
|
history
diff --git
a/ext/smoothstreaming/gstmssmanifest.c
b/ext/smoothstreaming/gstmssmanifest.c
index
2085b36
..
c855cb3
100644
(file)
--- 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) {