Closed danielbarry closed 5 years ago
Whoa that's cool! I will add the NULL check. I guess the address can be NULL for an interface. The patch you sent doesn't apply cleanly to my branch - if you would like to get your name directly in the commit history you can send me a pull request and I can merge it. Otherwise I will put you as in AUTHORS.txt for release 1.1
I will add the NULL check. I guess the address can be NULL for an interface.
Yeah, it took me by surprise too. It built and ran fine in my VM but crashed when running on my local machine. Maybe there is some weirdness about my setup, but it doesn't seem to harm to guard against the NULL appearing.
The patch you sent doesn't apply cleanly to my branch - if you would like to get your name directly in the commit history you can send me a pull request and I can merge it. Otherwise I will put you as in AUTHORS.txt for release 1.1
Creating a fork and then creating a PR from that is more hassle than it's worth for a single one line commit, the way you've done it seems fine.
This is now in the dev-1.1.0 branch. Good luck with your robot competitions! (And thanks for the patch!)
(Commit 626248ef)
This was released in 1.1.0
In the following method it is possible to run into a segmentation fault (commit 1451d9b92452a0cfa0be64ec298cba42cd5ed818):
After calling
getifaddrs()
it is possible thatp->ifa_addr == NULL
as per the documentation http://man7.org/linux/man-pages/man3/getifaddrs.3.html :As the following code relies on the pointer not being NULL and this method having no impact on the actual functionality of the server itself, I suggest a patch as follows:
P.S. Thanks for this awesome project, we are using it as part of a local debug server for a humanoid robotics project: https://www.humanoid.science/