aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2000-11-19 20:57:42 +0000
committerRichard Henderson <rth@redhat.com>2000-11-19 20:57:42 +0000
commitb612ab9c43d75a0cc80c8f777ac6257928e6a524 (patch)
tree7ffbe9efe679858118b46eb630b6e871af0bcede /binutils/readelf.c
parente85428fca34d86c6b432884ea40b565508fa8773 (diff)
downloadbinutils-b612ab9c43d75a0cc80c8f777ac6257928e6a524.zip
binutils-b612ab9c43d75a0cc80c8f777ac6257928e6a524.tar.gz
binutils-b612ab9c43d75a0cc80c8f777ac6257928e6a524.tar.bz2
* readelf.c (display_debug_lines): Adjust last change to
use sizeof (external->li_length).
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index f823815..f1873cd 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -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 + 4 > section->sh_size)
+ if (info.li_length + sizeof (external->li_length) > 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 + 4;
+ end_of_sequence = data + info.li_length + sizeof (external->li_length);
reset_state_machine (info.li_default_is_stmt);