diff --git a/dlls/netapi32/wksta.c b/dlls/netapi32/wksta.c index 1d22fc6f30..d89cd1a91a 100644 --- a/dlls/netapi32/wksta.c +++ b/dlls/netapi32/wksta.c @@ -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; }