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

Add Validations #70

Open
rye opened this issue Nov 18, 2019 · 0 comments
Open

Add Validations #70

rye opened this issue Nov 18, 2019 · 0 comments
Assignees

Comments

@rye
Copy link
Owner

rye commented Nov 18, 2019

As part of #26, we should include some kind of implementation for C-VALIDATE in all of the methods that require the NetAddr to be fully masked.

The worst case I can think of is a NetAddr that isn't masked, which doesn't really cause any harm as masking usually happens regardless. But, if somehow memory gets corrupted and a mask changes, the NetAddr's addr might be wrong. (Think: unsafeness through FFI or something ridiculous like that.)

I think it's sufficient to add debug_assert!'s. Could also add a feature for checks which would be on by default.

Worth some thinking.

@rye rye self-assigned this Nov 18, 2019
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