summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/modpost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 3ea5eb2b1029..8decf04633bc 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1141,7 +1141,7 @@ static Elf_Sym *find_tosym(struct elf_info *elf, Elf_Addr addr, Elf_Sym *sym)
static bool is_executable_section(struct elf_info *elf, unsigned int secndx)
{
- if (secndx > elf->num_sections)
+ if (secndx >= elf->num_sections)
return false;
return (elf->sechdrs[secndx].sh_flags & SHF_EXECINSTR) != 0;