summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2014-04-10 13:26:42 +0100
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2014-04-10 13:26:42 +0100
commit1afa3040b85817386435f4c93f513024662b11f3 (patch)
treef4186f42e0ed37c5c3277f68d100a3f8848e3036 /gst
parentf588d14cdc75f23d8ca43fd978c20726152f4250 (diff)
encodebin: guard against pathological NULL dereference
Coverity 1139798
Diffstat (limited to 'gst')
-rw-r--r--gst/encoding/gstencodebin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c
index a8e90521b..11c0a46df 100644
--- a/gst/encoding/gstencodebin.c
+++ b/gst/encoding/gstencodebin.c
@@ -1061,6 +1061,8 @@ _has_class (GstElement * element, const gchar * classname)
klass = GST_ELEMENT_GET_CLASS (element);
value = gst_element_class_get_metadata (klass, GST_ELEMENT_METADATA_KLASS);
+ if (!value)
+ return FALSE;
return strstr (value, classname) != NULL;
}