Author: janderwald
Date: Sat Aug 12 18:17:44 2006
New Revision: 23549
URL:
http://svn.reactos.org/svn/reactos?rev=23549&view=rev
Log:
* allocate a terminating zero for every parsed argument
Modified:
trunk/reactos/base/system/rundll32/rundll32.c
Modified: trunk/reactos/base/system/rundll32/rundll32.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/rundll32/rundl…
==============================================================================
--- trunk/reactos/base/system/rundll32/rundll32.c (original)
+++ trunk/reactos/base/system/rundll32/rundll32.c Sat Aug 12 18:17:44 2006
@@ -131,7 +131,7 @@
}
// 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