]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: Fix a stack-based off-by-one write in the HTTP remote backend 4544/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 29 Aug 2016 13:50:44 +0000 (15:50 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 6 Oct 2016 13:54:22 +0000 (15:54 +0200)
Reported by mongo (thanks!).

modules/remotebackend/httpconnector.cc

index 5b1cd1c1b20d6ecd16fe530060a1f470a1400ca2..bdafa3a80c84f2ff89d8afa2458f38730aff10fd 100644 (file)
@@ -397,7 +397,6 @@ int HTTPConnector::recv_message(Json& output) {
           throw NetworkError("EOF while reading");
         if (rd<0)
           throw NetworkError(std::string(strerror(rd)));
-        buffer[rd] = 0;
         arl.feed(std::string(buffer, rd));
       }
       // timeout occured.