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

modules/remotebackend/httpconnector.cc

index 80c7549e370dd4de4e9e91ea90d5c565d44e263c..1e732dc3582e0e9087705048482a9522f4a1b1f5 100644 (file)
@@ -394,7 +394,6 @@ int HTTPConnector::recv_message(rapidjson::Document &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.