mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
ws2_32: Fixed buffer size to MultiByteToWideChar.
This commit is contained in:
parent
0addd3ba5a
commit
f8600c706d
1 changed files with 2 additions and 3 deletions
|
@ -5007,7 +5007,7 @@ INT WINAPI WSAAddressToStringW( LPSOCKADDR sockaddr, DWORD len,
|
|||
LPDWORD lenstr )
|
||||
{
|
||||
INT ret;
|
||||
DWORD size, sizew;
|
||||
DWORD size;
|
||||
WCHAR buffer[54]; /* 32 digits + 7':' + '[' + '%" + 5 digits + ']:' + 5 digits + '\0' */
|
||||
CHAR bufAddr[54];
|
||||
|
||||
|
@ -5018,8 +5018,7 @@ INT WINAPI WSAAddressToStringW( LPSOCKADDR sockaddr, DWORD len,
|
|||
|
||||
if (ret) return ret;
|
||||
|
||||
sizew = sizeof( buffer );
|
||||
MultiByteToWideChar( CP_ACP, 0, bufAddr, size, buffer, sizew );
|
||||
MultiByteToWideChar( CP_ACP, 0, bufAddr, size, buffer, sizeof( buffer )/sizeof(WCHAR));
|
||||
|
||||
if (*lenstr < size)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue