NULL terminate the default argument vector. It is passed to execve().
Fixes #2160. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25166 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -274,7 +274,7 @@ receive_handshake_message(handshake_t& handshake)
|
|||||||
status_t
|
status_t
|
||||||
Shell::_Spawn(int row, int col, const char *encoding, int argc, const char **argv)
|
Shell::_Spawn(int row, int col, const char *encoding, int argc, const char **argv)
|
||||||
{
|
{
|
||||||
const char *kDefaultShellCommand[] = { "/bin/sh", "--login" };
|
const char *kDefaultShellCommand[] = { "/bin/sh", "--login", NULL };
|
||||||
|
|
||||||
if (argv == NULL || argc == 0) {
|
if (argv == NULL || argc == 0) {
|
||||||
argv = kDefaultShellCommand;
|
argv = kDefaultShellCommand;
|
||||||
|
|||||||
Reference in New Issue
Block a user