summaryrefslogtreecommitdiff
path: root/util/cbmem
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbmem')
-rw-r--r--util/cbmem/cbmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index 8ab80b0a59..90ad55e070 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -279,7 +279,7 @@ static struct lb_cbmem_ref parse_cbmem_ref(const struct lb_cbmem_ref *cbmem_ref)
{
struct lb_cbmem_ref ret;
- ret = *cbmem_ref;
+ aligned_memcpy(&ret, cbmem_ref, sizeof(ret));
if (cbmem_ref->size < sizeof(*cbmem_ref))
ret.cbmem_addr = (uint32_t)ret.cbmem_addr;
@@ -651,7 +651,7 @@ static void dump_timestamps(int mach_readable)
sorted_tst_p = malloc(size);
if (!sorted_tst_p)
die("Failed to allocate memory");
- memcpy(sorted_tst_p, tst_p, size);
+ aligned_memcpy(sorted_tst_p, tst_p, size);
qsort(&sorted_tst_p->entries[0], sorted_tst_p->num_entries,
sizeof(struct timestamp_entry), compare_timestamp_entries);