netapi32: Fix the size of allocation for the string returned from NetpGetComputerName.

This commit is contained in:
Eric Pouech 2006-10-22 21:48:45 +02:00 committed by Alexandre Julliard
parent a79fa50280
commit a8e5179d8e

View file

@ -445,7 +445,7 @@ NET_API_STATUS WINAPI NetpGetComputerName(LPWSTR *Buffer)
if (GetComputerNameW(*Buffer, &dwSize))
{
NetApiBufferReallocate(
*Buffer, dwSize * sizeof(WCHAR),
*Buffer, (dwSize + 1) * sizeof(WCHAR),
(LPVOID *) Buffer);
return NERR_Success;
}