From 58ea52a6a5b46fad7f00729c9bf59e8588061be3 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Thu, 24 Jan 2008 01:20:48 +0000 Subject: Fix potential buffer overflow git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46296 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/System/Win32/Program.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/System/Win32') 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(_alloca(len)); + char *command = reinterpret_cast(_alloca(len+1)); char *p = command; for (unsigned i = 0; args[i]; i++) { -- cgit v1.2.3