aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit27f1ebc52ba801ff6bc5cdf63cd476128f9e1f63 (patch)
treed2f9752cbf04fea24cd2cb7e45d1ea9b442c9c3a /lib/System
parent580607928bc87fa22ad5a71a16e0025722b339ea (diff)
downloadexternal_llvm-27f1ebc52ba801ff6bc5cdf63cd476128f9e1f63.zip
external_llvm-27f1ebc52ba801ff6bc5cdf63cd476128f9e1f63.tar.gz
external_llvm-27f1ebc52ba801ff6bc5cdf63cd476128f9e1f63.tar.bz2
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')
-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 3badb19..cb00213 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++) {