]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Ignore HTCP packets with invalid URI
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 8 Jul 2017 09:58:09 +0000 (21:58 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 8 Jul 2017 09:58:09 +0000 (21:58 +1200)
src/htcp.cc

index d199c0b7ae4804ffec05776791247ec4cc76b6df..1fd3718c3e5e38d97fca6aa3c09c0319531f22fc 100644 (file)
@@ -680,6 +680,11 @@ htcpUnpackSpecifier(char *buf, int sz)
 
     const MasterXaction::Pointer mx = new MasterXaction(XactionInitiator::initHtcp);
     s->request = HttpRequest::FromUrl(s->uri, mx, method == Http::METHOD_NONE ? HttpRequestMethod(Http::METHOD_GET) : method);
+    if (!s->request) {
+        debugs(31, 3, "failed to create request. Invalid URI?");
+        return nil;
+    }
+
     return s;
 }