LibDebug: Add array bounds check for m_source_files

This commit is contained in:
Gunnar Beutner 2021-04-16 11:39:23 +02:00 committed by Andreas Kling
parent a5d4ef462c
commit 4f6914a0c0
Notes: sideshowbarker 2024-07-18 20:16:35 +09:00

View file

@ -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);