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

Fixes #1570: raise the NTSTATUS returned by NtWow64* syscalls #1602

Merged
merged 2 commits into from
Oct 11, 2019
Merged

Fixes #1570: raise the NTSTATUS returned by NtWow64* syscalls #1602

merged 2 commits into from
Oct 11, 2019

Conversation

erwan-le-pape
Copy link
Contributor

The NtWow64* syscalls in process_info.c fail to save the returned NTSTATUS to pass in the raised exception, instead relying on GetLastError which is not set and returns 0.

This PR saves the returned status and uses psutil_SetFromNTStatusErr to raise the appropriate error instead of PyErr_SetFromOSErrnoWithSyscall.

@giampaolo
Copy link
Owner

Good catch. Could you please limit lines to 80 chars (e.g. like this:

            psutil_SetFromNTStatusErr(
                status,
                "NtWow64QueryInformationProcess64(ProcessBasicInformation)");

...) and also update CREDITS file?.

@giampaolo giampaolo merged commit c20d734 into giampaolo:master Oct 11, 2019
@giampaolo giampaolo added the bug label Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants