VERY experimental Nintendo Switch 2 emulator
C++
VideoCore: Fix out-of-bounds read in ShaderSetup::ProduceDebugInfo
Yuri Kunde Schlesner7872ec7cc3b8
diff --git a/src/video_core/shader/shader.cpp b/src/video_core/shader/shader.cppindex 272f3ffe1b..3febe739ca 100644--- a/src/video_core/shader/shader.cpp+++ b/src/video_core/shader/shader.cpp@@ -146,10 +146,8 @@ DebugData<true> ShaderSetup::ProduceDebugInfo(const InputVertex& input, int num_state.debug.max_opdesc_id = 0;// Setup input register table+ boost::fill(state.registers.input, Math::Vec4<float24>::AssignToAll(float24::Zero()));const auto& attribute_register_map = config.input_register_map;- float24 dummy_register;- boost::fill(state.registers.input, &dummy_register);-for (unsigned i = 0; i < num_attributes; i++)state.registers.input[attribute_register_map.GetRegisterForAttribute(i)] = input.attr[i];