From c15487961bb90e253118f726da54fce6b4403642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 23 Jun 2010 21:46:42 +0200 Subject: [PATCH] rtmpsrc: Do some sanity checks before accepting an URI Fixes bug #622369. --- ext/rtmp/gstrtmpsrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/rtmp/gstrtmpsrc.c b/ext/rtmp/gstrtmpsrc.c index e655323120..b9c0027bce 100644 --- a/ext/rtmp/gstrtmpsrc.c +++ b/ext/rtmp/gstrtmpsrc.c @@ -213,7 +213,8 @@ gst_rtmp_src_uri_set_uri (GstURIHandler * handler, const gchar * uri) unsigned int port; AVal playpath, app; - if (!RTMP_ParseURL (uri, &protocol, &host, &port, &playpath, &app)) { + if (!RTMP_ParseURL (uri, &protocol, &host, &port, &playpath, &app) || + !host.av_len || !playpath.av_len) { GST_ERROR_OBJECT (src, "Failed to parse URI %s", uri); return FALSE; }