mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibCore+Userland: Use StringViews when calling Core::System::open
For some reason we used raw char pointers sometimes, which caused at least one heap buffer overflow detected in fuzzing.
This commit is contained in:
parent
7dd3c5c981
commit
69218b92a5
Notes:
sideshowbarker
2024-07-17 09:34:30 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: 69218b92a5
Pull-request: https://github.com/SerenityOS/serenity/pull/14517
3 changed files with 3 additions and 3 deletions
|
@ -185,7 +185,7 @@ ErrorOr<void> File::open_path(StringView filename, mode_t permissions)
|
|||
VERIFY(m_fd == -1);
|
||||
auto flags = open_mode_to_options(m_mode);
|
||||
|
||||
m_fd = TRY(System::open(filename.characters_without_null_termination(), flags, permissions));
|
||||
m_fd = TRY(System::open(filename, flags, permissions));
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue