1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-05 17:28:47 +00:00

kernel32: Make sure the process has an entry point before starting it.

This commit is contained in:
Alexandre Julliard 2009-02-26 13:19:43 +01:00
parent cd6295d276
commit 825d7fda6c

View File

@ -898,6 +898,13 @@ static void start_process( void *arg )
entry = (LPTHREAD_START_ROUTINE)((char *)peb->ImageBaseAddress +
nt->OptionalHeader.AddressOfEntryPoint);
if (!nt->OptionalHeader.AddressOfEntryPoint)
{
ERR( "%s doesn't have an entry point, it cannot be executed\n",
debugstr_w(peb->ProcessParameters->ImagePathName.Buffer) );
ExitThread( 1 );
}
if (TRACE_ON(relay))
DPRINTF( "%04x:Starting process %s (entryproc=%p)\n", GetCurrentThreadId(),
debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry );