From a8e5179d8e59697896c4e39cf848fa4077372beb Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Sun, 22 Oct 2006 21:48:45 +0200 Subject: [PATCH] netapi32: Fix the size of allocation for the string returned from NetpGetComputerName. --- dlls/netapi32/wksta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/netapi32/wksta.c b/dlls/netapi32/wksta.c index 1d22fc6f303..d89cd1a91ad 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; }