Fix an illegal memorty access when running gprof over corrupt data.
PR 30324 * symtab.c (symtab_finalize): Only change the end address if dst has been updated.
This commit is contained in:
parent
9f1c612b7c
commit
91496180eb
@ -1,3 +1,9 @@
|
||||
2023-04-11 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 30324
|
||||
* symtab.c (symtab_finalize): Only change the end address if dst
|
||||
has been updated.
|
||||
|
||||
2023-02-20 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/ms.po: Updated Malayasian translation.
|
||||
|
@ -147,7 +147,7 @@ symtab_finalize (Sym_Table *tab)
|
||||
}
|
||||
}
|
||||
|
||||
if (tab->len > 0 && dst[-1].end_addr == 0)
|
||||
if (tab->len > 0 && dst > tab->base && dst[-1].end_addr == 0)
|
||||
dst[-1].end_addr
|
||||
= core_text_sect->vma + bfd_section_size (core_text_sect) - 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user