From abdcaf728b62c9ea03003b7b14485f558ac1fcbe Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 12 Feb 2010 00:36:51 +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 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"); -- 2.47.2