Author: gschneider
Date: Sat Nov 28 16:16:36 2009
New Revision: 44307
URL:
http://svn.reactos.org/svn/reactos?rev=44307&view=rev
Log:
[msvcrt]
- Fix buffer calculation in argvtoW, missed unicode character size
- Fixes another crash during GIMP startup, now GIMP starts (bug #3503, part 2)
- Fix same problem in valisttoA/W
Modified:
trunk/reactos/lib/sdk/crt/process/process.c
Modified: trunk/reactos/lib/sdk/crt/process/process.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/process/proces…
==============================================================================
--- trunk/reactos/lib/sdk/crt/process/process.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/process/process.c [iso-8859-1] Sat Nov 28 16:16:36 2009
@@ -128,7 +128,7 @@
len += _tcslen(argv[i]) + 1;
}
- str = ptr = (_TCHAR*) malloc(len + 1);
+ str = ptr = (_TCHAR*) malloc((len + 1) * sizeof(_TCHAR));
if (str == NULL)
return NULL;
@@ -163,7 +163,7 @@
}
while(ptr != NULL);
- str = (_TCHAR*) malloc(len + 1);
+ str = (_TCHAR*) malloc((len + 1) * sizeof(_TCHAR));
if (str == NULL)
return NULL;