Signed-off-by: Roland McGrath <roland@hack.frob.com>
+2013-01-07 Roland McGrath <roland@hack.frob.com>
+
+ * elf_getarsym.c (read_number_entries): Use memcpy instead of pointer
+ dereference so as not to assume the field is naturally aligned.
+
2012-09-17 Petr Machata <pmachata@redhat.com>
* elf.h: Update from glibc.
size_t w = index64_p ? 8 : 4;
if (elf->map_address != NULL)
- u = *(union u *) (elf->map_address + *offp);
+ /* Use memcpy instead of pointer dereference so as not to assume the
+ field is naturally aligned within the file. */
+ memcpy (&u, elf->map_address + *offp, sizeof u);
else if ((size_t) pread_retry (elf->fildes, &u, w, *offp) != w)
return -1;