From 20c282e3e8de9c5a4d55413e28cba080f59a991c Mon Sep 17 00:00:00 2001 From: klzgrad Date: Wed, 16 Oct 2024 20:02:20 +0800 Subject: [PATCH] Fix --proxy option parsing --- src/net/tools/naive/naive_config.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net/tools/naive/naive_config.cc b/src/net/tools/naive/naive_config.cc index 8d5b36aba4..51b38f148a 100644 --- a/src/net/tools/naive/naive_config.cc +++ b/src/net/tools/naive/naive_config.cc @@ -142,7 +142,7 @@ bool NaiveConfig::Parse(const base::Value::Dict& value) { remove_auth.ClearPassword(); GURL url_no_auth = url.ReplaceComponents(remove_auth); std::string proxy_uri = url_no_auth.GetWithEmptyPath().spec(); - if (proxy_uri.back() == '/') { + if (!proxy_uri.empty() && proxy_uri.back() == '/') { proxy_uri.pop_back(); }