Commit 825d7fda authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent cd6295d2
...@@ -898,6 +898,13 @@ static void start_process( void *arg ) ...@@ -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 );
......
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