summaryrefslogtreecommitdiff
path: root/lib/System/Win32
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
commit58ea52a6a5b46fad7f00729c9bf59e8588061be3 (patch)
treed2f9752cbf04fea24cd2cb7e45d1ea9b442c9c3a /lib/System/Win32
parentb487e7215c4f70f3d98f8fbc0a11eb119afc1f37 (diff)
downloadllvm-58ea52a6a5b46fad7f00729c9bf59e8588061be3.tar.gz
llvm-58ea52a6a5b46fad7f00729c9bf59e8588061be3.tar.bz2
llvm-58ea52a6a5b46fad7f00729c9bf59e8588061be3.tar.xz
Fix potential buffer overflow
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46296 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Win32')
-rw-r--r--lib/System/Win32/Program.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/System/Win32/Program.inc b/lib/System/Win32/Program.inc
index 3badb194d2..cb002132bf 100644
--- a/lib/System/Win32/Program.inc
+++ b/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++) {