kernel32: Make sure the process has an entry point before starting it.
This commit is contained in:
parent
cd6295d276
commit
825d7fda6c
|
@ -898,6 +898,13 @@ static void start_process( void *arg )
|
||||||
entry = (LPTHREAD_START_ROUTINE)((char *)peb->ImageBaseAddress +
|
entry = (LPTHREAD_START_ROUTINE)((char *)peb->ImageBaseAddress +
|
||||||
nt->OptionalHeader.AddressOfEntryPoint);
|
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))
|
if (TRACE_ON(relay))
|
||||||
DPRINTF( "%04x:Starting process %s (entryproc=%p)\n", GetCurrentThreadId(),
|
DPRINTF( "%04x:Starting process %s (entryproc=%p)\n", GetCurrentThreadId(),
|
||||||
debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry );
|
debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry );
|
||||||
|
|
Loading…
Reference in New Issue