Commit 4772289d authored by Rafaël Carré's avatar Rafaël Carré

Fix off by one

parent 56ec4da0
...@@ -919,7 +919,7 @@ static char * copy_next_paths_token( char * paths, char ** remaining_paths ) ...@@ -919,7 +919,7 @@ static char * copy_next_paths_token( char * paths, char ** remaining_paths )
assert( paths ); assert( paths );
/* Alloc a buffer to store the path */ /* Alloc a buffer to store the path */
path = malloc( strlen( paths ) ); path = malloc( strlen( paths ) + 1 );
if( !path ) return NULL; if( !path ) return NULL;
/* Look for PATH_SEP_CHAR (a ':' or a ';') */ /* Look for PATH_SEP_CHAR (a ':' or a ';') */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment