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

Fix WOW64 issue: NtQuerySystemInformation does not set ImageName.MaximumLength #1981

Merged
merged 3 commits into from Oct 18, 2021

Conversation

PetrPospisil
Copy link
Contributor

… when STATUS_INFO_LENGTH_MISMATCH is returned

Summary

Description

Added iterative algorithm to double the buffer size till the "ntfs max path len" when the NtQuerySystemInformation does not fill the ImageName.MaximumLength (happens in WOW64 WIN10 processes).

I did basic tests to fix the issue #1980 using the test app with extracted code. I did not do the testing using the modified psutil lib itself. It is up to you @giampaolo. Thx.

…ame.MaximumLength when STATUS_INFO_LENGTH_MISMATCH is returned

Signed-off-by: Petr Pospíšil <petr.pospisil@safetica.com>
Signed-off-by: Petr Pospíšil <petr.pospisil@safetica.com>
psutil/_psutil_windows.c Show resolved Hide resolved
psutil/_psutil_windows.c Outdated Show resolved Hide resolved
psutil/_psutil_windows.c Outdated Show resolved Hide resolved
psutil/_psutil_windows.c Outdated Show resolved Hide resolved
Signed-off-by: Petr Pospíšil <petr.pospisil@safetica.com>
@giampaolo
Copy link
Owner

Good change. Merging.

@giampaolo giampaolo merged commit adbfeae into giampaolo:master Oct 18, 2021
giampaolo added a commit that referenced this pull request Oct 18, 2021
…arnings

Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
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.

None yet

2 participants