[PATCH 2/2] msvcp90: Copy name in _Getctype (Valgrind) (try2)

Piotr Caban piotr.caban at gmail.com
Fri Jun 26 05:21:41 CDT 2015


On 06/24/15 16:46, Daniel Lehman wrote:
> +    name = ___lc_locale_name_func()[LC_COLLATE];
> +    size = wcslen(name)+1;
> +    ret->name = malloc(size*sizeof(*name));
> +    if (!ret->name) throw_exception(EXCEPTION_BAD_ALLOC, NULL);
> +    memcpy(ret->name, name, size*sizeof(*name));
This will not work if ___lc_locale_name_func()[LC_COLLATE] is NULL.

Thanks,
Piotr



More information about the wine-devel mailing list