msi: GetComputerName returns ERROR_BUFFER_OVERFLOW when the buffer is too small.
This commit is contained in:
parent
494e20541d
commit
eb7d8b92cb
|
@ -1014,7 +1014,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
|
|||
}
|
||||
}
|
||||
len = 0;
|
||||
if (!GetComputerNameW( NULL, &len ) && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
|
||||
if (!GetComputerNameW( NULL, &len ) && GetLastError() == ERROR_BUFFER_OVERFLOW)
|
||||
{
|
||||
WCHAR *computername;
|
||||
if ((computername = msi_alloc( len * sizeof(WCHAR) )))
|
||||
|
|
Loading…
Reference in New Issue