heim
heim copied to clipboard
Fix a possible segfault in heim::net::nic() for Windows
Hello,
After some time using heim::net::nic() on Windows (which I implemented some time ago in ad691385940babcab857b1e19ebe95af35b8d70e), I realized I introduced a potential null pointer dereferencing :fearful:
I've actually ran into this in some tests of mine, that segfaulted when an adapter had not been assigned any IP address.
This MR fixes this issue by properly checking for null pointers where I had forgotten to do so.
Luckily, this bug has never reached a tagged version nor a published version of the heim crate in crates.io