mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibDebug: Allow DWARF compilation unit header version <= 4
I think this is okay, the main thing to protect against is new versions of the format that we don't know about yet. This happens because an .S file compiled into libc.so has version 2 instead of version 4 like everything else. Fixes #4491.
This commit is contained in:
parent
c77dda6827
commit
75da835ffb
Notes:
sideshowbarker
2024-07-19 00:39:53 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/75da835ffbe
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ void DwarfInfo::populate_compilation_units()
|
|||
|
||||
stream >> Bytes { &compilation_unit_header, sizeof(compilation_unit_header) };
|
||||
ASSERT(compilation_unit_header.address_size == sizeof(u32));
|
||||
ASSERT(compilation_unit_header.version == 4);
|
||||
ASSERT(compilation_unit_header.version <= 4);
|
||||
|
||||
u32 length_after_header = compilation_unit_header.length - (sizeof(CompilationUnitHeader) - offsetof(CompilationUnitHeader, version));
|
||||
m_compilation_units.empend(*this, unit_offset, compilation_unit_header);
|
||||
|
|
Loading…
Reference in a new issue