]> git.sesse.net Git - vlc/commitdiff
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 3089cdd1c9066dac3f5029bf85b84fa87a2bb96e..1c974b7f8f32f01186d0ad09ba878d98e8f4a01d 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 );