summaryrefslogtreecommitdiff
path: root/libelf
diff options
context:
space:
mode:
Diffstat (limited to 'libelf')
-rw-r--r--libelf/ChangeLog5
-rw-r--r--libelf/elf_begin.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 8beecd4b..ef74b5bf 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-20 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * elf_begin.c (get_shnum): Elf64_Shdr.sh_size is an Elf64_Xword.
+ Fix the size argument to pread_retry.
+
2015-10-13 Chih-Hung Hsieh <chh@google.com>
* elf32_updatefile.c (__elfw2(LIBELFBITS,updatemmap)): Move nested
diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
index f26119c2..d2920c4e 100644
--- a/libelf/elf_begin.c
+++ b/libelf/elf_begin.c
@@ -216,7 +216,7 @@ get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset,
+ offset))->sh_size,
sizeof (Elf64_Xword));
else
- if (unlikely (pread_retry (fildes, &size, sizeof (Elf64_Word),
+ if (unlikely (pread_retry (fildes, &size, sizeof (Elf64_Xword),
offset + ehdr.e64->e_shoff
+ offsetof (Elf64_Shdr, sh_size))
!= sizeof (Elf64_Xword)))