From 78647edba7c16be5902eae13776a23ebbc1efc8e Mon Sep 17 00:00:00 2001 From: XadillaX Date: Thu, 24 Feb 2022 20:47:15 +0800 Subject: [PATCH] url, src: modify one `special_back_slash` Make it always equals to `false`. PR-URL: https://github.com/nodejs/node/pull/42112 Reviewed-By: Darshan Sen --- src/node_url.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node_url.cc b/src/node_url.cc index 6e47acf7ae3c3f..59abbe43f9917d 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -932,7 +932,10 @@ void URL::Parse(const char* input, url->flags &= ~URL_FLAGS_SPECIAL; special = false; } - special_back_slash = (special && ch == '\\'); + // `special_back_slash` equals to `(special && ch == '\\')` and `ch` + // here always not equals to `\\`. So `special_back_slash` here always + // equals to `false`. + special_back_slash = false; buffer.clear(); if (has_state_override) return;