From: Jukka Rissanen Date: Wed, 23 Nov 2011 13:31:39 +0000 (+0200) Subject: dnsproxy: Do not copy two extra bytes if using TCP X-Git-Tag: 0.78~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=358b68deea41bbbb4d6fc97123da7b3cf85a1c9a;p=platform%2Fupstream%2Fconnman.git dnsproxy: Do not copy two extra bytes if using TCP --- diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 24aad91..21512c6 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -387,7 +387,7 @@ static int ns_resolv(struct server_data *server, struct request_data *req, memcpy(alt + offset + altlen, request + offset + altlen - domlen, - req->request_len - altlen + domlen); + req->request_len - altlen - offset + domlen); if (server->protocol == IPPROTO_TCP) { int req_len = req->request_len + domlen - 2;