Commit e27f31d1 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Validate WINED3DSPR_TEXCRDOUT indices in shader_get_registers_used() (AFL).

parent 3a7df733
......@@ -1195,9 +1195,19 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
case WINED3DSPR_TEXCRDOUT:
if (shader_version.major >= 3)
{
if (idx >= ARRAY_SIZE(reg_maps->u.output_registers_mask))
{
WARN("Invalid output register index %u.\n", idx);
break;
}
reg_maps->u.output_registers_mask[idx] |= ins.dst[i].write_mask;
break;
}
if (idx >= ARRAY_SIZE(reg_maps->u.texcoord_mask))
{
WARN("Invalid texcoord index %u.\n", idx);
break;
}
reg_maps->u.texcoord_mask[idx] |= ins.dst[i].write_mask;
if (reg_maps->output_registers & (1u << idx))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment