Commit eb7d8b92 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

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

parent 494e2054
...@@ -1014,7 +1014,7 @@ static VOID set_installer_properties(MSIPACKAGE *package) ...@@ -1014,7 +1014,7 @@ static VOID set_installer_properties(MSIPACKAGE *package)
} }
} }
len = 0; len = 0;
if (!GetComputerNameW( NULL, &len ) && GetLastError() == ERROR_INSUFFICIENT_BUFFER) if (!GetComputerNameW( NULL, &len ) && GetLastError() == ERROR_BUFFER_OVERFLOW)
{ {
WCHAR *computername; WCHAR *computername;
if ((computername = msi_alloc( len * sizeof(WCHAR) ))) if ((computername = msi_alloc( len * sizeof(WCHAR) )))
......
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