mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	VideoCore: Fix out-of-bounds read in ShaderSetup::ProduceDebugInfo
As far as I can tell, memset was replaced by a fill without correcting the parameter type, causing an out-of-bounds array read in the Vec4 constructor.
This commit is contained in:
		
							parent
							
								
									4b14e17b18
								
							
						
					
					
						commit
						26b68313b9
					
				@ -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];
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user