ws2_32: Fixed buffer size to MultiByteToWideChar.

This commit is contained in:
Marcus Meissner 2009-07-19 15:31:28 +02:00 committed by Alexandre Julliard
parent 0addd3ba5a
commit f8600c706d
1 changed files with 2 additions and 3 deletions

View File

@ -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)
{