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>
This commit is contained in:
Heinrich Schuchardt 2019-01-09 21:41:13 +01:00 committed by Alexander Graf
parent f6c6df7ebc
commit 0bc81a717d

View File

@ -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);
}