mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibIDL: Fix use-after-free in GenerateWindowOrWorkerInterfaces
`lexical_bases` was storing `StringView`s into `ByteString`s returned from `LexicalPath::string()` that might no longer exist.
This commit is contained in:
parent
63873f3809
commit
c3783cf3bd
Notes:
github-actions[bot]
2024-11-16 13:40:52 +00:00
Author: https://github.com/yyny
Commit: c3783cf3bd
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2371
4 changed files with 8 additions and 9 deletions
|
@ -356,11 +356,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
VERIFY(!paths.is_empty());
|
||||
VERIFY(!base_paths.is_empty());
|
||||
|
||||
Vector<StringView> lexical_bases;
|
||||
Vector<ByteString> lexical_bases;
|
||||
for (auto const& base_path : base_paths) {
|
||||
VERIFY(!base_path.is_empty());
|
||||
LexicalPath lexical_path(base_path);
|
||||
lexical_bases.append(lexical_path.string());
|
||||
lexical_bases.append(base_path);
|
||||
}
|
||||
|
||||
// Read in all IDL files, we must own the storage for all of these for the lifetime of the program
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue