diff options
-rw-r--r-- | libelf/ChangeLog | 4 | ||||
-rw-r--r-- | libelf/elf_getarsym.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 23a4fb93..d425e50a 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,7 @@ +2017-04-19 Mark Wielaard <mark@klomp.org> + + * elf_getarsym.c (elf_getarsym): Initialize n to zero. + 2017-03-27 Mark Wielaard <mark@klomp.org> * elf32_updatefile.c (updatemmap): Always update last_positition. diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c index d5f0ba43..1f031fca 100644 --- a/libelf/elf_getarsym.c +++ b/libelf/elf_getarsym.c @@ -167,7 +167,7 @@ elf_getarsym (Elf *elf, size_t *ptr) /* We have an archive. The first word in there is the number of entries in the table. */ - uint64_t n; + uint64_t n = 0; size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr); if (read_number_entries (&n, elf, &off, index64_p) < 0) { |