From a4675f027c1ff1b7f9c7283be02a3019be35abf8 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 15 Jun 2020 08:55:04 +0000 Subject: [PATCH] [TD-603] fix #2244 reported by freemine --- src/plugins/http/src/httpHandle.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/http/src/httpHandle.c b/src/plugins/http/src/httpHandle.c index 5f89940a66..0d9b0ea025 100644 --- a/src/plugins/http/src/httpHandle.c +++ b/src/plugins/http/src/httpHandle.c @@ -59,6 +59,10 @@ bool httpParseURL(HttpContext* pContext) { HttpParser* pParser = &pContext->parser; char* pSeek; char* pEnd = strchr(pParser->pLast, ' '); + if (pEnd == NULL) { + return false; + } + if (*pParser->pLast != '/') { httpSendErrorResp(pContext, HTTP_UNSUPPORT_URL); return false; -- GitLab