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

Better registry support #148

Open
justanotheranonymoususer opened this issue Jan 7, 2025 · 0 comments
Open

Better registry support #148

justanotheranonymoususer opened this issue Jan 7, 2025 · 0 comments

Comments

@justanotheranonymoususer

I skimmed over the registry functions and I have several suggestions:

  • Several useful options are missing. For example RegGetValue receives no options at all, but:
    • RRF_SUBKEY_WOW6432KEY/RRF_SUBKEY_WOW6464KEY are necessary sometimes (with this function and RegOpen*/RegCreate* too)
    • RRF_NOEXPAND is always used, why?
    • Restricting by type can be useful, e.g. if I only expect DWORD, let me pass RRF_RT_REG_DWORD for performance and ease of use
  • Buffer size handling can be improved
  • Data validation is very simplistic (validate_retrieved_reg_val)
    • REG_SZ is checked for null terminator, but what about REG_EXPAND_SZ? REG_MULTI_SZ?
    • As far as I understand, parse_multi_z_str is unsafe because it's not bounded by the size but the buffer can be without the double null terminator
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

No branches or pull requests

1 participant