From: Amos Jeffries Date: Thu, 11 Feb 2010 11:36:51 +0000 (+1300) Subject: Author: Kieran Whitbread X-Git-Tag: SQUID_3_0_STABLE24~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abdcaf728b62c9ea03003b7b14485f558ac1fcbe;p=thirdparty%2Fsquid.git Author: Kieran Whitbread Bug 2858: Segment violation in HTCP --- diff --git a/src/htcp.cc b/src/htcp.cc index 16fe186a08..4fabed1919 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -1298,6 +1298,13 @@ htcpHandleClr(htcpDataHeader * hdr, char *buf, int sz, struct sockaddr_in *from) return; } + if (!s->request) { + debugs(31, 2, "htcpHandleTstRequest: failed to parse request"); + htcpLogHtcp(from, dhdr->opcode, LOG_UDP_INVALID, dash_str); + htcpFreeSpecifier(s); + return; + } + if (!htcpAccessCheck(Config.accessList.htcp_clr, s, from)) { debugs(31, 2, "htcpHandleClr: Access denied");