From: Michael Vogt Date: Thu, 25 Jul 2013 18:16:31 +0000 (+0200) Subject: fix off-by-one error in HttpMethod::​AutoDetectProxy() X-Git-Tag: 0.9.11~15^2~17 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/c104200045ef19f5ee061c4a00b468482ac65dc4?ds=inline fix off-by-one error in HttpMethod::​AutoDetectProxy() --- 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)