]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: Bugfix for bug 635 - SIGSEGV in httpReplyParse and 4K memPool
authorrobertc <>
Mon, 22 Dec 2003 17:28:49 +0000 (17:28 +0000)
committerrobertc <>
Mon, 22 Dec 2003 17:28:49 +0000 (17:28 +0000)
Keywords:

ALlow space for a termination character in the allocated buffer.

src/client_side.cc

index 1fe7001575fdc5c578b8647e9c06d578784cf0ef..51ef47a08b690f475a0fe6cca11f62443f07de08 100644 (file)
@@ -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