Eric Pouech : netapi32:
Fix the size of allocation for the string returned from
NetpGetComputerName .
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Oct 24 04:55:28 CDT 2006
Module: wine
Branch: master
Commit: a8e5179d8e59697896c4e39cf848fa4077372beb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a8e5179d8e59697896c4e39cf848fa4077372beb
Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date: Sun Oct 22 21:48:45 2006 +0200
netapi32: Fix the size of allocation for the string returned from NetpGetComputerName.
---
dlls/netapi32/wksta.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/netapi32/wksta.c b/dlls/netapi32/wksta.c
index 1d22fc6..d89cd1a 100644
--- a/dlls/netapi32/wksta.c
+++ b/dlls/netapi32/wksta.c
@@ -445,7 +445,7 @@ NET_API_STATUS WINAPI NetpGetComputerNam
if (GetComputerNameW(*Buffer, &dwSize))
{
NetApiBufferReallocate(
- *Buffer, dwSize * sizeof(WCHAR),
+ *Buffer, (dwSize + 1) * sizeof(WCHAR),
(LPVOID *) Buffer);
return NERR_Success;
}
More information about the wine-cvs
mailing list