Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safer GetProcesses #1739

Merged
merged 2 commits into from
May 12, 2024
Merged

Conversation

bluepilledgreat
Copy link
Member

@bluepilledgreat bluepilledgreat commented May 4, 2024

thanks microsoft
Closes #1679

@bluepilledgreat
Copy link
Member Author

Reminder for myself: Handle GetProcessesByName
https://discord.com/channels/1099468797410283540/1237352734014046259

2024-05-07T10:49:07Z [App::OnStartup] System.AggregateException: One or more errors occurred. (拒绝访问。)
 ---> System.ComponentModel.Win32Exception (5): 拒绝访问。
   at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
   at System.Diagnostics.NtProcessManager.GetModules(Int32 processId, Boolean firstModuleOnly)
   at System.Diagnostics.NtProcessManager.GetFirstModule(Int32 processId)
   at System.Diagnostics.Process.get_MainModule()
   at Bloxstrap.Bootstrapper.<ApplyModifications>b__35_0(Process x)
   at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   at Bloxstrap.Bootstrapper.ApplyModifications()
   at Bloxstrap.Bootstrapper.Run()
   at Bloxstrap.Bootstrapper.Run()
   --- End of inner exception stack trace ---

@pizzaboxer pizzaboxer merged commit 4e379dd into bloxstraplabs:main May 12, 2024
3 checks passed
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.

System.Diagnostics.GetProcesses() causing an integer overflow [D]
2 participants