diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2019-07-23 13:54:24 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2019-07-23 13:54:24 +0300 |
commit | 6cc32a39e726aea236992af502b7f7c725f78918 (patch) | |
tree | c13341c75f87d3775a4f3995dfd4d006c705b36f /gst/typefind | |
parent | ba9ef3c50ecaba47cd4ad57f570e4e0b746dba6e (diff) | |
download | gstreamer-plugins-base-6cc32a39e726aea236992af502b7f7c725f78918.tar.gz |
typefindfunctions: Check for NULL return of gst_type_find_peek() instead of segfaulting in otio typefinder
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/merge_requests/329#note_194943
Diffstat (limited to 'gst/typefind')
-rw-r--r-- | gst/typefind/gsttypefindfunctions.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index b343f00cc..e4277fde4 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -756,6 +756,9 @@ otio_type_find (GstTypeFind * tf, gpointer unused) return; data = (const gchar *) gst_type_find_peek (tf, tmp - data, 15); + if (!data) + return; + if (memcmp (data, "\"OTIO_SCHEMA\":", 15)) { gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, OTIO_CAPS); } |