diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-02-07 10:39:03 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-02-07 10:39:03 -0500 |
commit | 4bce2072acaca38d40086c943d8f332ed2c2cf50 (patch) | |
tree | 3f8af5f6d425dc4b32e7a58c00f4c27695d8c59c | |
parent | 86d5a6fac04a3f78b3bd2a8a7a1f2d9776010334 (diff) | |
parent | f2a30413a35bb360323a98fb124fbc629245978d (diff) | |
download | tor-4bce2072acaca38d40086c943d8f332ed2c2cf50.tar.gz tor-4bce2072acaca38d40086c943d8f332ed2c2cf50.zip |
Merge branch 'maint-0.2.6' into maint-0.2.7
-rw-r--r-- | changes/bug18710 | 6 | ||||
-rw-r--r-- | src/or/dnsserv.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/changes/bug18710 b/changes/bug18710 new file mode 100644 index 0000000000..269395563d --- /dev/null +++ b/changes/bug18710 @@ -0,0 +1,6 @@ + o Major bugfixes (DNS proxy): + - Stop a crash that could occur when a client running with DNSPort + received a query with multiple address types, where the first + address type was not supported. Found and fixed by Scott Dial. + Fixes bug 18710; bugfix on 0.2.5.4-alpha. + diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c index f7710908bd..f3618cc2c5 100644 --- a/src/or/dnsserv.c +++ b/src/or/dnsserv.c @@ -87,8 +87,6 @@ evdns_server_callback(struct evdns_server_request *req, void *data_) for (i = 0; i < req->nquestions; ++i) { if (req->questions[i]->dns_question_class != EVDNS_CLASS_INET) continue; - if (! q) - q = req->questions[i]; switch (req->questions[i]->type) { case EVDNS_TYPE_A: case EVDNS_TYPE_AAAA: @@ -96,7 +94,7 @@ evdns_server_callback(struct evdns_server_request *req, void *data_) /* We always pick the first one of these questions, if there is one. */ if (! supported_q) - supported_q = q; + supported_q = req->questions[i]; break; default: break; |