Fix format string injection in the Connection field for HTTP-served files
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 23 Dec 2007 17:42:57 +0000 (17:42 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 23 Dec 2007 17:42:57 +0000 (17:42 +0000)
(affects HTTP interface and LUA plus HTTP export for DVB and RTP)

src/network/httpd.c

index e0f141d..d4a4a25 100644 (file)
@@ -437,7 +437,7 @@ httpd_FileCallBack( httpd_callback_sys_t *p_sys, httpd_client_t *cl,
     psz_connection = httpd_MsgGet( &cl->query, "Connection" );
     if( psz_connection != NULL )
     {
-        httpd_MsgAdd( answer, "Connection", psz_connection );
+        httpd_MsgAdd( answer, "Connection", "%s", psz_connection );
     }
 
     httpd_MsgAdd( answer, "Content-Length", "%d", answer->i_body );