Re: [PATCH] advapi32: Set *lpSize properly in GetUserNameA (resend)
1 Jul
2011
1 Jul
'11
6:23 p.m.
Alex Stanev <alex(a)stanev.org> writes:
- ret = GetUserNameW( buffer, &sizeW ); + ret = GetUserNameW( buffer, lpSize ); if (ret) - WideCharToMultiByte( CP_ACP, 0, buffer, -1, lpszName, *lpSize, NULL, NULL ); - else - *lpSize = sizeW; + *lpSize = WideCharToMultiByte( CP_ACP, 0, buffer, -1, lpszName, *lpSize, NULL, NULL );
This is wrong, you can't use the W result as the A buffer size. -- Alexandre Julliard julliard(a)winehq.org
5279
Age (days ago)
5279
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard