Skip to content
Snippets Groups Projects
Commit 31b562e1 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

Add missing check for hostname answer_len in dnsserv size

This is checked elsewhere too, but let's be RFC-conformant.
parent c2aa2db8
Branches
Tags
No related merge requests found
......@@ -271,6 +271,7 @@ dnsserv_resolved(edge_connection_t *conn,
name,
1, (char*)answer, ttl);
} else if (answer_type == RESOLVED_TYPE_HOSTNAME &&
answer_len < 256 &&
conn->socks_request->command == SOCKS_COMMAND_RESOLVE_PTR) {
char *ans = tor_strndup(answer, answer_len);
evdns_server_request_add_ptr_reply(req, NULL,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment