]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Kieran Whitbread <k.j.whitbread@qmul.ac.uk>
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 10 Feb 2010 22:29:49 +0000 (11:29 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 10 Feb 2010 22:29:49 +0000 (11:29 +1300)
Bug 2858: Segment violation in HTCP

src/htcp.cc

index 96a42281b35abb15add6274c454d72dee708c51f..8d7d08c68fffb4afe23516ab4320e002665acaf9 100644 (file)
@@ -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);