From e9887c6cd979f91536d2160a43be5e749810a9be Mon Sep 17 00:00:00 2001 From: baiyfcu Date: Wed, 3 Apr 2024 14:27:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0checkHost=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Parser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Common/Parser.cpp b/src/Common/Parser.cpp index 7e7de860..cf50222b 100644 --- a/src/Common/Parser.cpp +++ b/src/Common/Parser.cpp @@ -302,6 +302,8 @@ void RtspUrl::setup(bool is_ssl, const string &url, const string &user, const st } static void inline checkHost(std::string &host) { + if (host.size() == 0) + return; if (host.back() == ']' && host.front() == '[') { // ipv6去除方括号 host.pop_back();