From: robertc <> Date: Mon, 22 Dec 2003 17:45:32 +0000 (+0000) Subject: Summary: Bugfix for #637 from Andres - SIGSEGV in httpReplyValidatorsMatch X-Git-Tag: SQUID_3_0_PRE4~1144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bd76974f60304c9b8f360c98787194add90754d;p=thirdparty%2Fsquid.git Summary: Bugfix for #637 from Andres - SIGSEGV in httpReplyValidatorsMatch Keywords: Don't assume both strings exist for strcasecmp. --- diff --git a/src/HttpReply.cc b/src/HttpReply.cc index 104631f3c0..515253c086 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -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;