From 0f75d28cb487f08b1613689680547939db1ec306 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 25 Apr 2008 21:32:11 +0000 Subject: [PATCH] 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 --- src/apps/terminal/Shell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/terminal/Shell.cpp b/src/apps/terminal/Shell.cpp index 157aa024c9..38396fb7bc 100644 --- a/src/apps/terminal/Shell.cpp +++ b/src/apps/terminal/Shell.cpp @@ -274,7 +274,7 @@ receive_handshake_message(handshake_t& handshake) status_t 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) { argv = kDefaultShellCommand;