summaryrefslogtreecommitdiffstats
path: root/lib/libelf/libelf_checksum.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libelf/libelf_checksum.c')
-rw-r--r--lib/libelf/libelf_checksum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libelf/libelf_checksum.c b/lib/libelf/libelf_checksum.c
index 3210412..c7eb8a0 100644
--- a/lib/libelf/libelf_checksum.c
+++ b/lib/libelf/libelf_checksum.c
@@ -76,7 +76,7 @@ _libelf_checksum(Elf *e, int elfclass)
*/
checksum = 0;
- for (shn = 1; shn < eh.e_shnum; shn++) {
+ for (shn = 1; shn < e->e_u.e_elf.e_nscn; shn++) {
if ((scn = elf_getscn(e, shn)) == NULL)
return (0);
if (gelf_getshdr(scn, &shdr) == NULL)
OpenPOWER on IntegriCloud