|
return ThrowInvalidURL(realm->env(), input.ToStringView(), nullptr); |
ThrowInvalidURL takes an std::optional<std::string> as third parameter. Passing nullptr constructs a std::string from that null pointer, this is undefined behaviour (upgraded to ill-formed in C++23). At a glance, it would seem that std::nullopt was the intended third argument.
node/src/node_url.cc
Line 164 in a724a9e
ThrowInvalidURLtakes anstd::optional<std::string>as third parameter. Passingnullptrconstructs astd::stringfrom that null pointer, this is undefined behaviour (upgraded to ill-formed in C++23). At a glance, it would seem thatstd::nulloptwas the intended third argument.