From: Amos Jeffries Date: Thu, 11 Feb 2010 11:18:52 +0000 (+1300) Subject: Author: Kieran Whitbread X-Git-Tag: SQUID_3_1_0_17~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=300bf8e1b36a48ea4904f540ad171d0b1db0fa3b;p=thirdparty%2Fsquid.git Author: Kieran Whitbread Bug 2858: Segment violation in HTCP --- diff --git a/src/htcp.cc b/src/htcp.cc index 96a42281b3..7bf02e2501 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -1270,6 +1270,13 @@ htcpHandleClr(htcpDataHeader * hdr, char *buf, int sz, IpAddress &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"); htcpLogHtcp(from, hdr->opcode, LOG_UDP_DENIED, s->uri);