diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-07-04 15:57:24 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2002-07-04 15:57:24 +0000 |
commit | 894bb1ee0362820cd7f887998259a2e6f41e4621 (patch) | |
tree | 1153f665b929730a75740ce231d7e7cd404e0a06 | |
parent | bb21884d5428ecf7b3c09192fc4ed46b2f504382 (diff) | |
download | gdb-894bb1ee0362820cd7f887998259a2e6f41e4621.zip gdb-894bb1ee0362820cd7f887998259a2e6f41e4621.tar.gz gdb-894bb1ee0362820cd7f887998259a2e6f41e4621.tar.bz2 |
* merge.c (_bfd_merged_section_offset): Avoid accessing byte before
section content start.
Reported by Michael Schumacher <mike@hightec-rt.com>.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/merge.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3fe1966..5727b7e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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 diff --git a/bfd/merge.c b/bfd/merge.c index 866b69c..df78261 100644 --- a/bfd/merge.c +++ b/bfd/merge.c @@ -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; } |