mirror of
https://github.com/reactos/reactos.git
synced 2025-02-20 15:35:04 +00:00
[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 svn path=/trunk/; revision=44307
This commit is contained in:
parent
b06cec2ffd
commit
8e09c97596
1 changed files with 2 additions and 2 deletions
|
@ -128,7 +128,7 @@ argvtosT(const _TCHAR* const* argv, _TCHAR delim)
|
|||
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 @@ valisttosT(const _TCHAR* arg0, va_list alist, _TCHAR delim)
|
|||
}
|
||||
while(ptr != NULL);
|
||||
|
||||
str = (_TCHAR*) malloc(len + 1);
|
||||
str = (_TCHAR*) malloc((len + 1) * sizeof(_TCHAR));
|
||||
if (str == NULL)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue