Commit a8e5179d authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

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

parent a79fa502
...@@ -445,7 +445,7 @@ NET_API_STATUS WINAPI NetpGetComputerName(LPWSTR *Buffer) ...@@ -445,7 +445,7 @@ NET_API_STATUS WINAPI NetpGetComputerName(LPWSTR *Buffer)
if (GetComputerNameW(*Buffer, &dwSize)) if (GetComputerNameW(*Buffer, &dwSize))
{ {
NetApiBufferReallocate( NetApiBufferReallocate(
*Buffer, dwSize * sizeof(WCHAR), *Buffer, (dwSize + 1) * sizeof(WCHAR),
(LPVOID *) Buffer); (LPVOID *) Buffer);
return NERR_Success; return NERR_Success;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment