mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +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
|
@ -17,7 +17,7 @@ namespace IDL {
|
|||
|
||||
class Parser {
|
||||
public:
|
||||
Parser(ByteString filename, StringView contents, Vector<StringView> import_base_paths);
|
||||
Parser(ByteString filename, StringView contents, Vector<ByteString> import_base_paths);
|
||||
Interface& parse();
|
||||
|
||||
Vector<ByteString> imported_files() const;
|
||||
|
@ -35,7 +35,7 @@ private:
|
|||
Yes,
|
||||
};
|
||||
|
||||
Parser(Parser* parent, ByteString filename, StringView contents, Vector<StringView> import_base_path);
|
||||
Parser(Parser* parent, ByteString filename, StringView contents, Vector<ByteString> import_base_path);
|
||||
|
||||
void assert_specific(char ch);
|
||||
void assert_string(StringView expected);
|
||||
|
@ -68,7 +68,7 @@ private:
|
|||
ByteString parse_identifier_ending_with_space();
|
||||
ByteString parse_identifier_ending_with_space_or(auto... possible_terminating_characters);
|
||||
|
||||
Vector<StringView> import_base_paths;
|
||||
Vector<ByteString> import_base_paths;
|
||||
ByteString filename;
|
||||
StringView input;
|
||||
LineTrackingLexer lexer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue