Fixed an iditoc bug in _wsystem where I didn't do a malloc(...*sizeof(WHAR)) License: LGPL Changelog: * dlls/msvcrt/process.c: Jaco Greeff <jaco@puxedo.org> - Fixed incorrect memory allocation in _wsystem to reflect the actual size
diff -aurN msvcrt-B07/dlls/msvcrt/process.c msvcrt-B08/dlls/msvcrt/process.c --- msvcrt-B07/dlls/msvcrt/process.c Tue Nov 5 14:33:22 2002 +++ msvcrt-B08/dlls/msvcrt/process.c Tue Nov 5 15:32:50 2002 @@ -562,7 +562,7 @@ * this way, it is executed as "comspec /c command" */ nLen = strlenW(wszComspec)+strlenW(wszExec)+strlenW(wszCmd); - if (!(wszCmdcopy = (WCHAR *)MSVCRT_malloc(nLen+1))) + if (!(wszCmdcopy = (WCHAR *)MSVCRT_malloc((nLen+1)*sizeof(WCHAR)))) { TRACE("Unable to allocate memory for _wsystem call\n"); return -1;