From 9e16831efbbc546eff5ef4612c3cecfbf5fd5d08 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <rem@videolan.org>
Date: Wed, 5 Sep 2007 19:24:52 +0000
Subject: [PATCH] Fix the exact same remote DoS as in RTSP stream output (SETUP
 without Transport:)

---
 modules/misc/rtsp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c
index b80e03b8005e..c1f6800794fb 100644
--- a/modules/misc/rtsp.c
+++ b/modules/misc/rtsp.c
@@ -924,6 +924,11 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
         {
             psz_playnow = httpd_MsgGet( query, "x-playNow" );
             psz_transport = httpd_MsgGet( query, "Transport" );
+            if( psz_transport == NULL )
+            {
+                answer->i_status = 400;
+                break;
+            }
             msg_Dbg( p_vod, "HTTPD_MSG_SETUP: transport=%s", psz_transport );
 
             if( strstr( psz_transport, "unicast" ) &&
-- 
GitLab