]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Have eventdns set the "truncated" bit correctly.
authorNick Mathewson <nickm@torproject.org>
Tue, 30 Jun 2009 14:05:42 +0000 (10:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 30 Jun 2009 14:05:42 +0000 (10:05 -0400)
Fixed bug 1022; This isn't actually a live bug in Tor, since in Tor
we never generate large DNS replies.

src/or/eventdns.c

index 4464148141bd6ea61cbec2c91d672b84b6678925..4ae17a40c32b16202efc30658fd69f5fa63a5745 100644 (file)
@@ -1842,7 +1842,7 @@ evdns_server_request_format_response(struct server_request *req, int err)
        if (j > 512) {
 overflow:
                j = 512;
-               buf[3] |= 0x02; /* set the truncated bit. */
+               buf[2] |= 0x02; /* set the truncated bit. */
        }
 
        req->response_len = (size_t)j;