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

gethostbyaddr_r: set result pointer to null on error, per specification #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AllSeeingEyeTolledEweSew

gethostbyaddr_r should set its struct hostent **result parameter to NULL on an error (reference). torsocks doesn't do this currently.

python, for example, gets tripped up by this:

$ torsocks python3 -c 'import socket; socket.getfqdn("127.0.0.1")'
1607419174 ERROR torsocks[3239]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_ptr_reply() at socks5.c:823)
Segmentation fault

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

Successfully merging this pull request may close these issues.

1 participant