Paul Gofman gofmanp@gmail.com writes:
@@ -1667,8 +1667,14 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
RtlNormalizeProcessParams( params );
- TRACE( "%s image %s cmdline %s\n", debugstr_us( path ),
debugstr_us( ¶ms->ImagePathName ), debugstr_us( ¶ms->CommandLine ));
- TRACE( "%s image %s cmdline %s, parent %p.\n", debugstr_us( path ),
debugstr_us( ¶ms->ImagePathName ), debugstr_us( ¶ms->CommandLine ), parent);
- if (parent == INVALID_HANDLE_VALUE)
- {
memset(info, 0, sizeof(*info));
return STATUS_INVALID_HANDLE;
- }
You are still using INVALID_HANDLE_VALUE here, I don't think that makes sense. The check for an invalid handle should use a truly invalid value like 0xdeadbeef.
It may be interesting to test what happens with GetCurrentProcess(), and also some other handle pointing to the current process, but that should be separate from the generic invalid handle test.