From: Vincent Penquerc'h Date: Thu, 10 Apr 2014 12:26:42 +0000 (+0100) Subject: encodebin: guard against pathological NULL dereference X-Git-Tag: 1.19.3~511^2~4608 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1afa3040b85817386435f4c93f513024662b11f3;p=platform%2Fupstream%2Fgstreamer.git encodebin: guard against pathological NULL dereference Coverity 1139798 --- diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index a8e90521b1..11c0a46df1 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; }