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

src/htcp.cc

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