From 771491bec812eeb31ff45c77dfa0fa7989515801 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 2 Aug 2008 23:48:29 +0000 Subject: [PATCH] The command line args can easily exceed the maximal tracing buffer allocation size, which caused the Exec traced entry to crash when printed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26745 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/team.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/system/kernel/team.cpp b/src/system/kernel/team.cpp index 60b616bed9..79df223ea7 100644 --- a/src/system/kernel/team.cpp +++ b/src/system/kernel/team.cpp @@ -157,11 +157,14 @@ public: { out.Print("team exec, \"%p\", args:", fPath); - char* args = fArgs; - for (int32 i = 0; !out.IsFull() && i < fArgCount; i++) { - out.Print(" \"%s\"", args); - args += strlen(args) + 1; - } + if (fArgs != NULL) { + char* args = fArgs; + for (int32 i = 0; !out.IsFull() && i < fArgCount; i++) { + out.Print(" \"%s\"", args); + args += strlen(args) + 1; + } + } else + out.Print(" "); } private: