summaryrefslogtreecommitdiffstats
path: root/libelf
diff options
context:
space:
mode:
Diffstat (limited to 'libelf')
-rw-r--r--libelf/ChangeLog5
-rw-r--r--libelf/gelf_getauxv.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 674a720c..46d4731c 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-25 Kurt Roeckx <[email protected]>
+
+ * gelf_getauxv.c (gelf_getauxv): Use memcpy instead of pointer
+ dereference to avoid alignment problems.
+
2013-01-07 Roland McGrath <[email protected]>
* elf_getarsym.c (elf_getarsym): Copy FILE_DATA into stack space if it
diff --git a/libelf/gelf_getauxv.c b/libelf/gelf_getauxv.c
index d87362ef..2a5b6f06 100644
--- a/libelf/gelf_getauxv.c
+++ b/libelf/gelf_getauxv.c
@@ -97,7 +97,8 @@ gelf_getauxv (data, ndx, dst)
goto out;
}
- *dst = ((GElf_auxv_t *) data_scn->d.d_buf)[ndx];
+ memcpy(dst, (char *) data_scn->d.d_buf + ndx * sizeof (GElf_auxv_t),
+ sizeof (GElf_auxv_t));
}
result = dst;