From 6412f46c1315f999621c9c52e674fd32f3b73bf7 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 11 Feb 2010 11:29:49 +1300 Subject: [PATCH] Author: Kieran Whitbread Bug 2858: Segment violation in HTCP --- src/htcp.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/htcp.cc b/src/htcp.cc index 96a42281b3..8d7d08c68f 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -1270,6 +1270,13 @@ htcpHandleClr(htcpDataHeader * hdr, char *buf, int sz, IpAddress &from) return; } + if (NULL == s->request) { + debugs(31, 3, "htcpHandleClr: request not generated."); + htcpLogHtcp(from, hdr->opcode, LOG_UDP_INVALID, s->uri); + 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); -- 2.47.3