mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
* readelf.c (display_debug_lines): Fix section length check
and end_of_sequence computation.
This commit is contained in:
parent
b90a5f516a
commit
512d22f487
@ -1,3 +1,8 @@
|
||||
2000-11-17 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* readelf.c (display_debug_lines): Fix section length check
|
||||
and end_of_sequence computation.
|
||||
|
||||
2000-11-06 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* binutils.texi: Add GNU Free Documentation License.
|
||||
|
@ -5005,7 +5005,7 @@ display_debug_lines (section, start, file)
|
||||
|
||||
/* Check the length of the block. */
|
||||
info.li_length = BYTE_GET (external->li_length);
|
||||
if (info.li_length > section->sh_size)
|
||||
if (info.li_length + 4 > section->sh_size)
|
||||
{
|
||||
warn
|
||||
(_("The line info appears to be corrupt - the section is too small\n"));
|
||||
@ -5040,7 +5040,7 @@ display_debug_lines (section, start, file)
|
||||
printf (_(" Line Range: %d\n"), info.li_line_range);
|
||||
printf (_(" Opcode Base: %d\n"), info.li_opcode_base);
|
||||
|
||||
end_of_sequence = data + info.li_length + sizeof (info.li_length);
|
||||
end_of_sequence = data + info.li_length + 4;
|
||||
|
||||
reset_state_machine (info.li_default_is_stmt);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user