mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibDebug: Add array bounds check for m_source_files
This commit is contained in:
parent
a5d4ef462c
commit
4f6914a0c0
Notes:
sideshowbarker
2024-07-18 20:16:35 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/4f6914a0c04 Pull-request: https://github.com/SerenityOS/serenity/pull/6373 Reviewed-by: https://github.com/alimpfard
1 changed files with 3 additions and 0 deletions
|
@ -98,6 +98,9 @@ void LineProgram::append_to_line_info()
|
|||
if (!m_is_statement)
|
||||
return;
|
||||
|
||||
if (m_file_index >= m_source_files.size())
|
||||
return;
|
||||
|
||||
String directory = m_source_directories[m_source_files[m_file_index].directory_index];
|
||||
|
||||
StringBuilder full_path(directory.length() + m_source_files[m_file_index].name.length() + 1);
|
||||
|
|
Loading…
Reference in a new issue