msi: GetComputerName returns ERROR_BUFFER_OVERFLOW when the buffer is too small.

This commit is contained in:
Hans Leidekker 2011-11-03 11:40:16 +01:00 committed by Alexandre Julliard
parent 494e20541d
commit eb7d8b92cb

View File

@ -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) )))