Add checks and unit tests for get_interface_address* failure

Ensure that either a valid address is returned in address pointers,
or that the address data is zeroed on error.

Ensure that free_interface_address6_list handles NULL lists.

Add unit tests for get_interface_address* failure cases.

Fixes bug #17173.
Patch by fk/teor, not in any released version of tor.
This commit is contained in:
teor (Tim Wilson-Brown)
2015-09-29 07:04:49 +02:00
committed by Nick Mathewson
parent 3ea834ce0a
commit 7fa102b487
4 changed files with 125 additions and 12 deletions
+10
View File
@@ -0,0 +1,10 @@
o Minor bug fixes (addresses, testing):
- Handle errors in get_interface_address6_via_udp_socket_hack by
returning an empty list (no addresses found). This bug was triggered
in ElectroBSD/FreeBSD jails.
- Ensure that either a valid address is returned in address pointers,
or that the address data is zeroed on error.
- Ensure that free_interface_address6_list handles NULL lists.
- Add unit tests for get_interface_address* failure cases.
Fixes bug #17173.
Patch by fk/teor, not in any released version of tor.