summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-01-24 01:20:48 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-01-24 01:20:48 +0000
commita4f27608bc5cac0713426aa52792355f23197281 (patch)
tree4b8f03d3d38bcfed9b7202060764b5853d8106f1 /llvm/lib/System
parent2a8a485630bf9bdcee3c848728d842f494b6ee90 (diff)
downloadbcm5719-llvm-a4f27608bc5cac0713426aa52792355f23197281.tar.gz
bcm5719-llvm-a4f27608bc5cac0713426aa52792355f23197281.zip
Fix potential buffer overflow
llvm-svn: 46296
Diffstat (limited to 'llvm/lib/System')
-rw-r--r--llvm/lib/System/Win32/Program.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/System/Win32/Program.inc b/llvm/lib/System/Win32/Program.inc
index 3badb194d26..cb002132bfe 100644
--- a/llvm/lib/System/Win32/Program.inc
+++ b/llvm/lib/System/Win32/Program.inc
@@ -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++) {
OpenPOWER on IntegriCloud