Skip to content
Snippets Groups Projects
Commit a8e5179d authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard
Browse files

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

parent a79fa502
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment