From: Amos Jeffries Date: Sat, 8 Jul 2017 09:58:09 +0000 (+1200) Subject: Ignore HTCP packets with invalid URI X-Git-Tag: SQUID_3_5_28~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79b237917bf539605d9db4f50fa0beed1be862c3;p=thirdparty%2Fsquid.git Ignore HTCP packets with invalid URI --- diff --git a/src/htcp.cc b/src/htcp.cc index c0241aa962..55d08ffda0 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -749,9 +749,12 @@ htcpUnpackSpecifier(char *buf, int sz) s->request = HttpRequest::CreateFromUrlAndMethod(s->uri, method == Http::METHOD_NONE ? HttpRequestMethod(Http::METHOD_GET) : method); - if (s->request) - HTTPMSGLOCK(s->request); + if (!s->request) { + debugs(31, 3, "failed to create request. Invalid URI?"); + return NULL; + } + HTTPMSGLOCK(s->request); return s; }