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
This commit is contained in:
Ingo Weinhold 2008-08-02 23:48:29 +00:00
parent 0ad9adef62
commit 771491bec8

View File

@ -157,11 +157,14 @@ public:
{ {
out.Print("team exec, \"%p\", args:", fPath); out.Print("team exec, \"%p\", args:", fPath);
char* args = fArgs; if (fArgs != NULL) {
for (int32 i = 0; !out.IsFull() && i < fArgCount; i++) { char* args = fArgs;
out.Print(" \"%s\"", args); for (int32 i = 0; !out.IsFull() && i < fArgCount; i++) {
args += strlen(args) + 1; out.Print(" \"%s\"", args);
} args += strlen(args) + 1;
}
} else
out.Print(" <too long>");
} }
private: private: