]> git.sesse.net Git - vlc/commitdiff
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 e0f141d25bb58dfad0ab7a2ad57702dda6a15505..d4a4a259df8097750e4b46f4fd9fd75c4f76e931 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 );