Commit 8a4748bf authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

dnsapi: Fixed incorrect buffer size to GetComputerNameExW.

parent fe09bc1a
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment