]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: Bugfix for #637 from Andres - SIGSEGV in httpReplyValidatorsMatch
authorrobertc <>
Mon, 22 Dec 2003 17:45:32 +0000 (17:45 +0000)
committerrobertc <>
Mon, 22 Dec 2003 17:45:32 +0000 (17:45 +0000)
Keywords:

Don't assume both strings exist for strcasecmp.

src/HttpReply.cc

index 104631f3c0d0f7a1f28d643952b61a2cb4b1ef05..515253c086c15a5586941f85e81d7f676870cfb4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpReply.cc,v 1.64 2003/09/29 10:24:00 robertc Exp $
+ * $Id: HttpReply.cc,v 1.65 2003/12/22 10:45:32 robertc Exp $
  *
  * DEBUG: section 58    HTTP Reply (Response)
  * AUTHOR: Alex Rousskov
@@ -353,7 +353,7 @@ httpReplyValidatorsMatch(HttpReply const * rep, HttpReply const * otherRep)
 
     two = httpHeaderGetStrOrList(&otherRep->header, HDR_CONTENT_MD5);
 
-    if (strcasecmp (one.buf(), two.buf())) {
+    if (!one.buf() || !two.buf() || strcasecmp (one.buf(), two.buf())) {
         one.clean();
         two.clean();
         return 0;