From: Amos Jeffries Date: Sat, 8 Jul 2017 09:58:09 +0000 (+1200) Subject: Ignore HTCP packets with invalid URI X-Git-Tag: M-staged-PR71~84 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1de31ba2ae9b724568b461fa40ae02f025e01eed;p=thirdparty%2Fsquid.git Ignore HTCP packets with invalid URI --- diff --git a/src/htcp.cc b/src/htcp.cc index d199c0b7ae..1fd3718c3e 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -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; }