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

Notifier::<Config>::get is unsound #1758

Open
fuzzypixelz opened this issue Feb 5, 2025 · 0 comments
Open

Notifier::<Config>::get is unsound #1758

fuzzypixelz opened this issue Feb 5, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@fuzzypixelz
Copy link
Member

fuzzypixelz commented Feb 5, 2025

Describe the bug

This function has the following signature:

pub fn get<'a>(&'a self, key: &str) -> ZResult<LookupGuard<'a, Config>>

Where LookupGuard<'a, Config> dereferences (using unsafe) into Config. However, the underlying ValidatedMap::get returns Any and is supposed to be the type of a member of Config such as ConnectConfig.

By the way, LookupGuard is not even exported.

Either the signature should be fixed, or get should be removed entirely in favor of get_json.

To reproduce

N/A

System info

@fuzzypixelz fuzzypixelz added the bug Something isn't working label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant