diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-08-03 18:13:46 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-08-03 18:13:46 +0200 |
commit | 784b95ddbf8c3f3babe50c641d2ef8fe64442d15 (patch) | |
tree | 29559ba46f85e5a2ca98caf6e31a0dc6fca905ec /gst/rtsp/gstrtspsrc.c | |
parent | 654ca56d854471fcceb9e406c68a0e2f6f48e116 (diff) |
rtspsrc: don't add non-utf8 chars to structures
Diffstat (limited to 'gst/rtsp/gstrtspsrc.c')
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 267765e2..050e1511 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -1042,6 +1042,10 @@ gst_rtspsrc_sdp_attributes_to_caps (GArray * attributes, GstCaps * caps) if (!strcmp (key, "range")) continue; + /* string must be valid UTF8 */ + if (!g_utf8_validate (attr->value, -1, NULL)) + continue; + if (!g_str_has_prefix (key, "x-")) tofree = key = g_strdup_printf ("a-%s", key); else |