From aa8b40c7a5853c58365037004a408bd7895108ed Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Thu, 8 Apr 2021 02:54:01 +0200 Subject: [PATCH] early-access version 1565 --- README.md | 2 +- src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a2e463be8..fe5604c5f 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1564. +This is the source code for early-access 1565. ## Legal Notice diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index 933d42f3f..2edd803f3 100755 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp @@ -248,7 +248,13 @@ NvResult nvhost_ctrl_gpu::ZBCSetTable(const std::vector& input, std::vector< IoctlZbcSetTable params{}; std::memcpy(¶ms, input.data(), input.size()); // TODO(ogniK): What does this even actually do? - std::memcpy(output.data(), ¶ms, output.size()); + + // Prevent null pointer being passed as arg 1 + if (output.empty()) { + LOG_WARNING(Service_NVDRV, "Avoiding passing null pointer to memcpy"); + } else { + std::memcpy(output.data(), ¶ms, output.size()); + } return NvResult::Success; }