From d5a69ecb68969babcb69a8503d12e59756269c60 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sat, 2 May 2020 00:14:37 +1000 Subject: nvdrv: Fix GetGpuTime stack corruption IoctlGetGpuTime should be 16 bytes, not 8. --- src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/hle/service/nvdrv') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h index 642b0a2cb..07b644ec5 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h @@ -159,9 +159,10 @@ private: static_assert(sizeof(IoctlFlushL2) == 8, "IoctlFlushL2 is incorrect size"); struct IoctlGetGpuTime { - u64_le gpu_time; + u64_le gpu_time{}; + INSERT_PADDING_WORDS(2); }; - static_assert(sizeof(IoctlGetGpuTime) == 8, "IoctlGetGpuTime is incorrect size"); + static_assert(sizeof(IoctlGetGpuTime) == 0x10, "IoctlGetGpuTime is incorrect size"); u32 GetCharacteristics(const std::vector& input, std::vector& output, std::vector& output2, IoctlVersion version); -- cgit v1.2.3