From 9ab72b3399f2780b99fb61a0012762dba2f92ff2 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sat, 12 Aug 2006 14:17:44 +0000 Subject: [PATCH] * allocate a terminating zero for every parsed argument svn path=/trunk/; revision=23549 --- reactos/base/system/rundll32/rundll32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/base/system/rundll32/rundll32.c b/reactos/base/system/rundll32/rundll32.c index cceafa88d53..252e154727c 100644 --- a/reactos/base/system/rundll32/rundll32.c +++ b/reactos/base/system/rundll32/rundll32.c @@ -131,7 +131,7 @@ LPTSTR *WINAPI CommandLineToArgv(LPCTSTR lpCmdLine, int *lpArgc) } // Allocate space for the pointers in argv and the strings in one block - argv = (LPTSTR *)malloc(argc * sizeof(LPTSTR) + (_tcslen(lpArg) + 1) * sizeof(TCHAR)); + argv = (LPTSTR *)malloc(argc * sizeof(LPTSTR) + (_tcslen(lpArg) + argc) * sizeof(TCHAR)); if (!argv) { // Memory allocation failed