File 10824.patch of Package squid-beta

---------------------
PatchSet 10824 
Date: 2007/05/22 16:37:26
Author: rousskov
Branch: HEAD
Tag: (none) 
Log:
Bug #1967 fix: avoid new strncmp() that silently converts char* buffers into
Strings because String length is limited by 64KB and because it is an
expensive conversion.

All similar conversions should be removed, but that is bug #1970.

Members: 
	src/HttpReply.cc:1.93->1.94 

Index: squid3/src/HttpReply.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/HttpReply.cc,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- squid3/src/HttpReply.cc	18 May 2007 06:41:22 -0000	1.93
+++ squid3/src/HttpReply.cc	22 May 2007 16:37:26 -0000	1.94
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpReply.cc,v 1.93 2007/05/18 06:41:22 amosjeffries Exp $
+ * $Id: HttpReply.cc,v 1.94 2007/05/22 16:37:26 rousskov Exp $
  *
  * DEBUG: section 58    HTTP Reply (Response)
  * AUTHOR: Alex Rousskov
@@ -433,7 +433,7 @@
 
 bool HttpReply::sanityCheckStartLine(MemBuf *buf, http_status *error)
 {
-    if (buf->contentSize() >= protoPrefix.size() && strncmp(protoPrefix, buf->content(), protoPrefix.size()) != 0) {
+    if (buf->contentSize() >= protoPrefix.size() && protoPrefix.compare(buf->content(), protoPrefix.size()) != 0) {
         debugs(58, 3, "HttpReply::sanityCheckStartLine: missing protocol prefix (" << protoPrefix << ") in '" << buf->content() << "'");
         *error = HTTP_INVALID_HEADER;
         return false;