Add checks and unit tests for get_interface_address* failure
commit7fa102b48783b51673095e1ddcb2f88050a2ba32
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>
Tue, 29 Sep 2015 05:04:49 +0000 (29 07:04 +0200)
committerNick Mathewson <nickm@torproject.org>
Tue, 29 Sep 2015 08:17:05 +0000 (29 10:17 +0200)
tree2ca26db29d68f8a31397b1c04a16a752b5d9f04b
parent3ea834ce0a63f275fd806f9ebeec64a2bbcd1b55
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.
changes/bug17173-socket-hack-rv [new file with mode: 0644]
src/common/address.c
src/common/address.h
src/test/test_address.c