]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix end-of-reply handling in helperHandleRead.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 21 Dec 2012 09:27:17 +0000 (10:27 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 21 Dec 2012 09:27:17 +0000 (10:27 +0100)
Detected by Coverity Scan. Issue 747703.

src/helper.cc

index 0539c58861be1222a361ddeb96f29f5f79bfc52e..0d5a5bd0cdb98f77dad33ec31676fdf944b020e5 100644 (file)
@@ -935,7 +935,7 @@ helperHandleRead(const Comm::ConnectionPointer &conn, char *buf, size_t len, com
         debugs(84, 3, "helperHandleRead: end of reply found");
 
         if (t > srv->rbuf && t[-1] == '\r' && hlp->eom == '\n') {
-            t = '\0';
+            *t = '\0';
             // rewind to the \r octet which is the real terminal now
             // and remember that we have to skip forward 2 places now.
             skip = 2;