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 registry reading code to allow for a single null byte on a wide string value #662

Merged
merged 2 commits into from
Dec 3, 2020

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Dec 3, 2020

Fixes #657

Change

The issue was due to a REG_SZ value containing a wide string with a narrow null terminator. Move to using RegGetValue, as it ensures that a proper null character will always be at the end of a registry string value.

Validation

The provided registry hive was readable by the underlying list code, and a new test is added to ensure that this specific case works.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner December 3, 2020 21:50
@ghost ghost added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Dec 3, 2020
Copy link
Contributor

@yao-msft yao-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@JohnMcPMS JohnMcPMS merged commit 4f7ce38 into microsoft:master Dec 3, 2020
@JohnMcPMS JohnMcPMS deleted the fixregstring branch December 3, 2020 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Examining ARP entries leads to winget crash
2 participants