[vlc-devel] commit: Fix off by one ( Rafaël Carré )

git version control git at videolan.org
Sat Mar 29 12:13:06 CET 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat Mar 29 12:12:43 2008 +0100| [4772289dac12cfddca874a9aa2ab333f4a48a146]

Fix off by one

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

 src/modules/modules.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/modules/modules.c b/src/modules/modules.c
index 13cf4e6..2892b2c 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -919,7 +919,7 @@ static char * copy_next_paths_token( char * paths, char ** remaining_paths )
     assert( paths );
 
     /* Alloc a buffer to store the path */
-    path = malloc( strlen( paths ) );
+    path = malloc( strlen( paths ) + 1 );
     if( !path ) return NULL;
 
     /* Look for PATH_SEP_CHAR (a ':' or a ';') */




More information about the vlc-devel mailing list