Permalink
Browse files

Merge pull request #11717 from z2442/master

Added a check to the pointer for memcpy
  • Loading branch information...
hrydgard committed Jan 6, 2019
2 parents 33e65ea + e5b75dc commit aaa4494cb10e41f0728f24ca036418d252903ace
Showing with 3 additions and 1 deletion.
  1. +3 −1 Core/HLE/sceKernelInterrupt.cpp
@@ -684,7 +684,9 @@ const HLEFunction Kernel_Library[] =

static u32 sysclib_memcpy(u32 dst, u32 src, u32 size) {
ERROR_LOG(SCEKERNEL, "Untested sysclib_memcpy(dest=%08x, src=%08x, size=%i)", dst, src, size);
memcpy(Memory::GetPointer(dst), Memory::GetPointer(src), size);
if (Memory::IsValidRange(dst, size) && Memory::IsValidRange(src, size)) {
memcpy(Memory::GetPointer(dst), Memory::GetPointer(src), size);
}
return dst;
}

0 comments on commit aaa4494

Please sign in to comment.