[vlc-commits] ntservice: Fix potential buffer overflow

Hugo Beauzée-Luyssen git at videolan.org
Tue Feb 14 15:30:39 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Feb 14 14:27:56 2017 +0100| [71212349f2f902576fde943b6c6af89df6b0a72a] | committer: Hugo Beauzée-Luyssen

ntservice: Fix potential buffer overflow

CID #1402742

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=71212349f2f902576fde943b6c6af89df6b0a72a
---

 modules/control/ntservice.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/control/ntservice.c b/modules/control/ntservice.c
index a35d253..66cac56 100644
--- a/modules/control/ntservice.c
+++ b/modules/control/ntservice.c
@@ -200,7 +200,7 @@ static int NTServiceInstall( intf_thread_t *p_intf )
     if( psz_extra )
     {
         strcat( psz_path, " --ntservice-extraintf " );
-        strcat( psz_path, psz_extra );
+        strncat( psz_path, psz_extra, MAX_PATH - strlen( psz_path ) - 1 );
         free( psz_extra );
     }
 
@@ -208,7 +208,7 @@ static int NTServiceInstall( intf_thread_t *p_intf )
     if( psz_extra && *psz_extra )
     {
         strcat( psz_path, " " );
-        strcat( psz_path, psz_extra );
+        strncat( psz_path, psz_extra, MAX_PATH - strlen( psz_path ) - 1 );
     }
     free( psz_extra );
 



More information about the vlc-commits mailing list