-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid string construction #57133
Labels
confirmed-bug
Issues with confirmed bugs.
Comments
Correct. Contributions are welcome. |
Would the change be like this - return ThrowInvalidURL(realm->env(), input.ToStringView(), nullptr);
+ return ThrowInvalidURL(realm->env(), input.ToStringView(), std::nullopt); If so, could this issue be a |
Hey, I'd like to take this on. |
Can, I take this one if there is no objection? |
Hey @Ali-Adel-Nour, there is an open PR addressing this issue already (#57141). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
node/src/node_url.cc
Line 164 in a724a9e
ThrowInvalidURL
takes anstd::optional<std::string>
as third parameter. Passingnullptr
constructs astd::string
from that null pointer, this is undefined behaviour (upgraded to ill-formed in C++23). At a glance, it would seem thatstd::nullopt
was the intended third argument.The text was updated successfully, but these errors were encountered: