mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
Everywhere: Explicitly specify the size in StringView constructors
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
This commit is contained in:
@@ -41,7 +41,7 @@ CommandLine const& kernel_command_line()
|
||||
UNMAP_AFTER_INIT void CommandLine::initialize()
|
||||
{
|
||||
VERIFY(!s_the);
|
||||
s_the = new CommandLine(s_cmd_line);
|
||||
s_the = new CommandLine({ s_cmd_line, strlen(s_cmd_line) });
|
||||
dmesgln("Kernel Commandline: {}", kernel_command_line().string());
|
||||
// Validate the modes the user passed in.
|
||||
(void)s_the->panic_mode(Validate::Yes);
|
||||
|
||||
Reference in New Issue
Block a user