Skip to content

Invalid string construction #57133

Closed
Closed
@PJBoy

Description

@PJBoy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions