From 171e89c63a1c306c82e876e39f5094997c152b39 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 9 Mar 2010 13:42:50 +0100 Subject: [PATCH] client: guard against invalid paths --- gst/rtsp-server/rtsp-client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index b0e10e3..350291c 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -721,8 +721,8 @@ handle_setup_request (GstRTSPClient * client, GstRTSPUrl * uri, * always /stream=%d so we need to strip that off * parse the stream we need to configure, look for the stream in the abspath * first and then in the query. */ - if (!(pos = strstr (uri->abspath, "/stream="))) { - if (!(pos = strstr (uri->query, "/stream="))) + if (uri->abspath == NULL || !(pos = strstr (uri->abspath, "/stream="))) { + if (uri->query == NULL || !(pos = strstr (uri->query, "/stream="))) goto bad_request; } -- 2.7.4