From c104200045ef19f5ee061c4a00b468482ac65dc4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 25 Jul 2013 20:16:31 +0200 Subject: [PATCH] =?utf8?q?fix=20off-by-one=20error=20in=20HttpMethod::?= =?utf8?q?=E2=80=8BAutoDetectProxy()?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- methods/http.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/methods/http.cc b/methods/http.cc index db1085a2d..ec5b1ff52 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -1401,7 +1401,7 @@ bool HttpMethod::AutoDetectProxy() char buf[512]; int InFd = Pipes[0]; close(Pipes[1]); - int res = read(InFd, buf, sizeof(buf)); + int res = read(InFd, buf, sizeof(buf)-1); ExecWait(Process, "ProxyAutoDetect", true); if (res < 0) -- 2.50.0