Skip to content

Conversation

@RatinCN
Copy link
Contributor

@RatinCN RatinCN commented Jan 2, 2026

If CreateProcess failed, lpProcessInformation should be zeroed (Windows behavior), but the current code is returning uninitialized values (the local variable pi).

A simple way to fix this is PROCESS_INFORMATION pi = { 0 };, but this will result in an unnecessary ZeroMemory call in success path or an unnecessary CopyMemory call in fail path, so I chose another way to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant