Re: [PATCH 2/2] msvcp90: Copy name in _Getctype (Valgrind)
24 Jun
2015
24 Jun
'15
9:21 a.m.
On 06/23/15 22:57, 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); There should be size*sizeof(*name) in memcpy. Also please rename the variable to len if it's used to store length (or store buffer size in it).
Thanks, Piotr
3823
Age (days ago)
3823
Last active (days ago)
0 comments
1 participants
participants (1)
-
Piotr Caban