mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user