From: robertc <> Date: Mon, 22 Dec 2003 17:28:49 +0000 (+0000) Subject: Summary: Bugfix for bug 635 - SIGSEGV in httpReplyParse and 4K memPool X-Git-Tag: SQUID_3_0_PRE4~1145 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a419b96941d15c85a00a60b8b0dfa5cc27fb609;p=thirdparty%2Fsquid.git Summary: Bugfix for bug 635 - SIGSEGV in httpReplyParse and 4K memPool Keywords: ALlow space for a termination character in the allocated buffer. --- diff --git a/src/client_side.cc b/src/client_side.cc index 1fe7001575..51ef47a08b 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.667 2003/11/05 21:32:12 hno Exp $ + * $Id: client_side.cc,v 1.668 2003/12/22 10:28:49 robertc Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1966,7 +1966,9 @@ parseHttpRequest(ConnStateData::Pointer & conn, method_t * method_p, int ConnStateData::getAvailableBufferLength() const { - return in.allocatedSize - in.notYetUsed; + int result = in.allocatedSize - in.notYetUsed - 1; + assert (result >= 0); + return result; } void