wined3d: Validate WINED3DSPR_TEXCRDOUT indices in shader_get_registers_used() (AFL).
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3a7df733c4
commit
e27f31d18c
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue