Fix potential buffer overflow

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov 2008-01-24 01:20:48 +00:00
parent b487e7215c
commit 58ea52a6a5

View File

@ -134,7 +134,7 @@ Program::ExecuteAndWait(const Path& path,
}
// Now build the command line.
char *command = reinterpret_cast<char *>(_alloca(len));
char *command = reinterpret_cast<char *>(_alloca(len+1));
char *p = command;
for (unsigned i = 0; args[i]; i++) {