Repository navigation
Handle unnamed winreg values in QueryValueEx - #9589
Conversation
Accept a required None value name, preserve UTF-16 strings, issue the CPython audit event, and return initial registry errors before retrying. Assisted-by: dot:frontier-intelligence
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
winreg.QueryValueEx(key, None)query the unnamed/default registry value, while keeping the name argument required.winreg.QueryValueaudit event after argument conversion and before the registry query; rebuild the audit name from the UTF-16 buffer as CPython does.ERROR_MORE_DATA, rather than retrying unrelated failures because the returned size is zero. Keep a nonzero buffer after a successful zero-length size query so a value that grows between calls can be retried.The audit tuple and its name are only built when audit hooks are active. Invalid-name type-error wording remains a pre-existing difference; #9586 separately improves the HKEY conversion used here. This does not claim full winreg parity.
Validation
PC/winreg.candPC/clinic/winreg.c.h, including conversion and audit order.prekhooks andgit diff --checkpassed.Summary by CodeRabbit
winreg.QueryValueExnow acceptsNoneas the value name, allowing queries of a registry key’s default value.