ntdll: Check for invalid WINEARCH values.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2016-12-16 15:20:18 +01:00
parent c67a728c91
commit df3b7958a7
1 changed files with 9 additions and 1 deletions

View File

@ -1375,7 +1375,15 @@ void server_init_process(void)
fatal_perror( "Bad server socket %d", fd_socket );
unsetenv( "WINESERVERSOCKET" );
}
else fd_socket = server_connect();
else
{
const char *arch = getenv( "WINEARCH" );
if (arch && strcmp( arch, "win32" ) && strcmp( arch, "win64" ))
fatal_error( "WINEARCH set to invalid value '%s', it must be either win32 or win64.\n", arch );
fd_socket = server_connect();
}
/* setup the signal mask */
sigemptyset( &server_block_set );