* merge.c (_bfd_merged_section_offset): Avoid accessing byte before

section content start.
	Reported by Michael Schumacher <mike@hightec-rt.com>.
This commit is contained in:
Jakub Jelinek 2002-07-04 15:57:24 +00:00
parent bb21884d54
commit 894bb1ee03
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-07-04 Jakub Jelinek <jakub@redhat.com>
* merge.c (_bfd_merged_section_offset): Avoid accessing byte before
section content start.
Reported by Michael Schumacher <mike@hightec-rt.com>.
2002-07-04 Alan Modra <amodra@bigpond.net.au>
* section.c (_bfd_strip_section_from_output): Remove unnecessary

View File

@ -912,7 +912,7 @@ _bfd_merged_section_offset (output_bfd, psec, psecinfo, offset, addend)
if (sec->entsize == 1)
{
p = secinfo->contents + offset + addend - 1;
while (*p && p >= secinfo->contents)
while (p >= secinfo->contents && *p)
--p;
++p;
}