diff options
author | Nick Clifton <nickc@redhat.com> | 2001-02-11 22:14:01 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2001-02-11 22:14:01 +0000 |
commit | 88ec60c7e0289fec29403ef5a02180e3fa396c6b (patch) | |
tree | 8698621e8b902f32eabfaece305bc81537eff95d /binutils/readelf.c | |
parent | 17cc6a06fb3b69309d54c31d27834d5a105fe1d7 (diff) | |
download | gdb-88ec60c7e0289fec29403ef5a02180e3fa396c6b.zip gdb-88ec60c7e0289fec29403ef5a02180e3fa396c6b.tar.gz gdb-88ec60c7e0289fec29403ef5a02180e3fa396c6b.tar.bz2 |
fix seg fault in reloc reading code
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 1f18a05..923403a 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -997,7 +997,10 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) putchar ('\n'); } - free (relas); + if (is_rela) + free (relas); + else + free (rels); return 1; } @@ -3412,7 +3415,7 @@ process_unwind (file) printf ("'%s'", SECTION_NAME (unwsec)); printf (_(" at offset 0x%lx contains %lu entries:\n"), - unwsec->sh_offset, unwsec->sh_size / (3 * addr_size)); + unwsec->sh_offset, (unsigned long) (unwsec->sh_size / (3 * addr_size))); (void) slurp_ia64_unwind_table (file, & aux, unwsec); |