mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix buffer overflow in execvpe(3).
This commit is contained in:
parent
3a1c89f7a5
commit
2e855f4095
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
|
||||
Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2013.
|
||||
Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2013, 2014.
|
||||
|
||||
This file is part of the Sortix C Library.
|
||||
|
||||
|
@ -79,7 +79,7 @@ extern "C" int execvpe(const char* filename, char* const* argv,
|
|||
if ( !fullpath )
|
||||
return -1;
|
||||
stpcpy(stpcpy(stpncpy(fullpath, path, len), "/"), filename);
|
||||
if ( (path += len + 1)[0] == ':' )
|
||||
if ( (path += len)[0] == ':' )
|
||||
path++;
|
||||
|
||||
execve(fullpath, argv, envp);
|
||||
|
|
Loading…
Reference in a new issue