summaryrefslogtreecommitdiff
path: root/gst/frei0r
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2010-09-28 16:14:14 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2010-09-28 16:16:31 +0200
commit498620d16c8661d216c45694622c540cfb838b90 (patch)
treef780013d3e083e63c0c5b75715772c62f47c86a8 /gst/frei0r
parentd0d40557325a14cad255d61031afd50d6a2ba494 (diff)
downloadgstreamer-plugins-bad-498620d16c8661d216c45694622c540cfb838b90.tar.gz
frei0r: Fix crashes if plugins don't provide correct property information
The vertigo plugin for example claims to have 3 properties but the 3rd property does nothing and has a NULL name. Fixes bug #630783. Thanks to Martti Kühne for debugging this.
Diffstat (limited to 'gst/frei0r')
-rw-r--r--gst/frei0r/gstfrei0r.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gst/frei0r/gstfrei0r.c b/gst/frei0r/gstfrei0r.c
index 2254dc2ec..6b8c0080a 100644
--- a/gst/frei0r/gstfrei0r.c
+++ b/gst/frei0r/gstfrei0r.c
@@ -72,6 +72,12 @@ gst_frei0r_klass_install_properties (GObjectClass * gobject_class,
ftable->get_param_info (param_info, i);
+ if (!param_info->name) {
+ GST_ERROR ("Property %d of %s without a valid name", i,
+ g_type_name (G_TYPE_FROM_CLASS (gobject_class)));
+ continue;
+ }
+
prop_name = g_ascii_strdown (param_info->name, -1);
g_strcanon (prop_name, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-+", '-');
/* satisfy glib2 (argname[0] must be [A-Za-z]) */