aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-08-12 23:25:23 +0000
committerIan Lance Taylor <ian@airs.com>1994-08-12 23:25:23 +0000
commite9227b4255b7eb706e50fe043e2212b22d0fe572 (patch)
tree4ec78a6ccaf3bcba3682b28eb8cddd2408863d3d /bfd/elfcode.h
parent4fb7359d9732eb52a34a9d1b51aa775d362207b3 (diff)
downloadgdb-e9227b4255b7eb706e50fe043e2212b22d0fe572.zip
gdb-e9227b4255b7eb706e50fe043e2212b22d0fe572.tar.gz
gdb-e9227b4255b7eb706e50fe043e2212b22d0fe572.tar.bz2
* elfcode.h (section_from_elf_index): Correct check for invalid
section index.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 4cad55d..f6e14fa 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -2524,7 +2524,7 @@ section_from_elf_index (abfd, index)
if (index == SHN_COMMON)
return bfd_com_section_ptr;
- if (index > elf_elfheader (abfd)->e_shnum)
+ if (index >= elf_elfheader (abfd)->e_shnum)
return NULL;
{