Fix remote DoS against the RTSP server when Transport is not specified
authorRémi Denis-Courmont <rem@videolan.org>
Tue, 21 Aug 2007 18:52:42 +0000 (18:52 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Tue, 21 Aug 2007 18:52:42 +0000 (18:52 +0000)
modules/stream_out/rtp.c

index 3089cdd..1c974b7 100644 (file)
@@ -1782,6 +1782,14 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args,
         case HTTPD_MSG_SETUP:
         {
             const char *psz_transport = httpd_MsgGet( query, "Transport" );
+            if( psz_transport == NULL )
+            {
+                answer->i_status = 461;
+                answer->psz_status = strdup( "Unsupported Transport" );
+                answer->i_body = 0;
+                answer->p_body = NULL;
+                break;
+            }
 
             //fprintf( stderr, "HTTPD_MSG_SETUP: transport=%s\n", psz_transport );