mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 04:13:35 +00:00
Fix 2 kernel32:environ tests.
The GetComputerNameEx ComputerNameDnsDomain tests can't succeed if we have no domain, as the function succeeds querying a zero length domain into a zero length buffer. svn path=/trunk/; revision=41404
This commit is contained in:
@@ -286,7 +286,11 @@ BOOL
|
||||
WINAPI
|
||||
GetComputerNameA(LPSTR lpBuffer, LPDWORD lpnSize)
|
||||
{
|
||||
return GetComputerNameExA(ComputerNameNetBIOS, lpBuffer, lpnSize);
|
||||
BOOL ret;
|
||||
ret = GetComputerNameExA(ComputerNameNetBIOS, lpBuffer, lpnSize);
|
||||
if(!ret && GetLastError() == ERROR_MORE_DATA)
|
||||
SetLastError(ERROR_BUFFER_OVERFLOW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +301,11 @@ BOOL
|
||||
WINAPI
|
||||
GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
|
||||
{
|
||||
return GetComputerNameExW(ComputerNameNetBIOS, lpBuffer, lpnSize);
|
||||
BOOL ret;
|
||||
ret=GetComputerNameExW(ComputerNameNetBIOS, lpBuffer, lpnSize);
|
||||
if(!ret && GetLastError() == ERROR_MORE_DATA)
|
||||
SetLastError(ERROR_BUFFER_OVERFLOW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user