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

REG_NONE type causes deserialization abort #66

Open
marekr opened this issue May 13, 2024 · 0 comments · May be fixed by #67
Open

REG_NONE type causes deserialization abort #66

marekr opened this issue May 13, 2024 · 0 comments · May be fixed by #67

Comments

@marekr
Copy link

marekr commented May 13, 2024

I'm doing something somewhat simple as enumerating the list of installed apps

let uninstall_key = root
    .open_subkey_with_flags(path, KEY_READ | KEY_WOW64_32KEY)
    .expect("key is missing");

// let apps: HashMap<String, InstalledApp> = uninstall_key.decode().unwrap_or_default();
let apps_result = uninstall_key.decode();

It turns out on my PC, one of the installed apps in the 32-bit view must have a key declared as REG_NONE incorrectly.

winreg does check the type in serialization_serde.rs, but the problem is, returning the DecodeResult with a error causes the entire deserialization to fail, even if the rest of the keys I'm attempting to extract are valid.

I modified line 39 of serialization_serde.rs to
_ => no_impl!(format!("value type deserialization not implemented {:?}", v.vtype)),

so that I could confirm the error:

Problem opening the file: DecodeNotImplemented("value type deserialization not implemented REG_NONE")

@marekr marekr linked a pull request May 13, 2024 that will close this issue
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 a pull request may close this issue.

1 participant