summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-07-25 20:16:31 +0200
committerMichael Vogt <mvo@debian.org>2013-07-25 20:16:31 +0200
commitc104200045ef19f5ee061c4a00b468482ac65dc4 (patch)
tree60b144e459d2ea6421a26920e0805e7b583d3d40 /methods
parent26d5b68a008cfedec113ebdde782c3d18478a5b4 (diff)
fix off-by-one error in HttpMethod::​AutoDetectProxy()
Diffstat (limited to 'methods')
-rw-r--r--methods/http.cc2
1 files changed, 1 insertions, 1 deletions
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)