mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:47:36 +00:00
LibDebug: Fix truncation in ExtendedOpcodes::SetDiscriminator
The parameter of this operator is an unsigned LEB128 integer, so it can be more than 1 byte in length. If we only read 1 byte, we might mess up the offsets for the instructions following it.
This commit is contained in:
parent
d3f5416b70
commit
7546295abe
1 changed files with 2 additions and 1 deletions
|
@ -170,7 +170,8 @@ void LineProgram::handle_extended_opcode()
|
|||
}
|
||||
case ExtendedOpcodes::SetDiscriminator: {
|
||||
dbgln_if(DWARF_DEBUG, "SetDiscriminator");
|
||||
m_stream.discard_or_error(1);
|
||||
size_t discriminator;
|
||||
m_stream.read_LEB128_unsigned(discriminator);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue