From: Francesco Chemolli Date: Fri, 21 Dec 2012 09:27:17 +0000 (+0100) Subject: Fix end-of-reply handling in helperHandleRead. X-Git-Tag: SQUID_3_4_0_1~428 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6235d21c682b10bdb001ada874728dd2c8633be2;p=thirdparty%2Fsquid.git Fix end-of-reply handling in helperHandleRead. Detected by Coverity Scan. Issue 747703. --- diff --git a/src/helper.cc b/src/helper.cc index 0539c58861..0d5a5bd0cd 100644 --- a/src/helper.cc +++ b/src/helper.cc @@ -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;