aboutsummaryrefslogtreecommitdiff
path: root/bfd/merge.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-07-04 15:57:24 +0000
committerJakub Jelinek <jakub@redhat.com>2002-07-04 15:57:24 +0000
commit894bb1ee0362820cd7f887998259a2e6f41e4621 (patch)
tree1153f665b929730a75740ce231d7e7cd404e0a06 /bfd/merge.c
parentbb21884d5428ecf7b3c09192fc4ed46b2f504382 (diff)
downloadgdb-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>.
Diffstat (limited to 'bfd/merge.c')
-rw-r--r--bfd/merge.c2
1 files changed, 1 insertions, 1 deletions
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;
}