From 95beec805cbe3275788709c3b468a8c73f8e1297 Mon Sep 17 00:00:00 2001 From: coco Date: Thu, 11 Feb 2016 16:38:50 +0100 Subject: [PATCH] fixed memcpy that should be memmove --- qemu/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/memory.c b/qemu/memory.c index 26683230..af38155f 100644 --- a/qemu/memory.c +++ b/qemu/memory.c @@ -85,7 +85,7 @@ void memory_unmap(struct uc_struct *uc, MemoryRegion *mr) if (uc->mapped_blocks[i] == mr) { uc->mapped_block_count--; //shift remainder of array down over deleted pointer - memcpy(&uc->mapped_blocks[i], &uc->mapped_blocks[i + 1], sizeof(MemoryRegion*) * (uc->mapped_block_count - i)); + memmove(&uc->mapped_blocks[i], &uc->mapped_blocks[i + 1], sizeof(MemoryRegion*) * (uc->mapped_block_count - i)); mr->destructor(mr); g_free((char *)mr->name); g_free(mr->ioeventfds);