Marcus Meissner : dnsapi: Fixed incorrect buffer size to GetComputerNameExW .

Alexandre Julliard julliard at winehq.org
Mon Sep 15 06:54:55 CDT 2008


Module: wine
Branch: master
Commit: 8a4748bf01e1d4be86819f46640aa6b17526b38e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8a4748bf01e1d4be86819f46640aa6b17526b38e

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sun Sep 14 10:13:17 2008 +0200

dnsapi: Fixed incorrect buffer size to GetComputerNameExW.

---

 dlls/dnsapi/query.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/dnsapi/query.c b/dlls/dnsapi/query.c
index 6c7e4c8..75e2e33 100644
--- a/dlls/dnsapi/query.c
+++ b/dlls/dnsapi/query.c
@@ -773,7 +773,7 @@ static DNS_STATUS dns_get_hostname_a( COMPUTER_NAME_FORMAT format,
                                       PSTR buffer, PDWORD len )
 {
     char name[256];
-    DWORD size = sizeof(name);
+    DWORD size = sizeof(name)/sizeof(name[0]);
 
     if (!GetComputerNameExA( format, name, &size ))
         return DNS_ERROR_NAME_DOES_NOT_EXIST;
@@ -792,7 +792,7 @@ static DNS_STATUS dns_get_hostname_w( COMPUTER_NAME_FORMAT format,
                                       PWSTR buffer, PDWORD len )
 {
     WCHAR name[256];
-    DWORD size = sizeof(name);
+    DWORD size = sizeof(name)/sizeof(name[0]);
 
     if (!GetComputerNameExW( format, name, &size ))
         return DNS_ERROR_NAME_DOES_NOT_EXIST;




More information about the wine-cvs mailing list