diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-04-04 21:39:38 +0200 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2021-04-05 06:49:09 +0200 |
commit | 638c892edf806837702f80ad5a0e57da0c8dbabe (patch) | |
tree | 9f078a2483f31b6a3744834b31a83b75346c35d8 /src/core/hle | |
parent | Merge pull request #6139 from Morph1984/cmake-fix-build (diff) | |
download | yuzu-638c892edf806837702f80ad5a0e57da0c8dbabe.tar yuzu-638c892edf806837702f80ad5a0e57da0c8dbabe.tar.gz yuzu-638c892edf806837702f80ad5a0e57da0c8dbabe.tar.bz2 yuzu-638c892edf806837702f80ad5a0e57da0c8dbabe.tar.lz yuzu-638c892edf806837702f80ad5a0e57da0c8dbabe.tar.xz yuzu-638c892edf806837702f80ad5a0e57da0c8dbabe.tar.zst yuzu-638c892edf806837702f80ad5a0e57da0c8dbabe.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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 100644 --- 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<u8>& 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; } |