summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-01-09 21:41:13 +0100
committerAlexander Graf <agraf@suse.de>2019-02-13 09:40:06 +0100
commit0bc81a717d1ce90008f9f8ae8b3c086d4405a295 (patch)
tree8fd76846179586d6fba51e1204961705ba94177f /lib
parentf6c6df7ebc12fdaab252c5869732cef6fa48d864 (diff)
efi_loader: fix CopyMem()
CopyMem() must support overlapping buffers. So replace memcpy() by memmove(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_boottime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 88386ff676..dbf0d56c1d 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -2483,7 +2483,7 @@ static void EFIAPI efi_copy_mem(void *destination, const void *source,
size_t length)
{
EFI_ENTRY("%p, %p, %ld", destination, source, (unsigned long)length);
- memcpy(destination, source, length);
+ memmove(destination, source, length);
EFI_EXIT(EFI_SUCCESS);
}