mirror of
https://github.com/reactos/reactos.git
synced 2025-02-21 16:04:57 +00:00
[WINESYNC] d3dx9: Validate state operation in d3dx_parse_state().
Signed-off-by: Paul Gofman <gofmanp@gmail.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 2b5b069dd70ba328dc0ce660861ad802feae912c by Paul Gofman <gofmanp@gmail.com>
This commit is contained in:
parent
777269ea64
commit
51b2c71b54
2 changed files with 7 additions and 1 deletions
|
@ -5568,6 +5568,12 @@ static HRESULT d3dx_parse_state(struct d3dx_effect *effect, struct d3dx_state *s
|
|||
state->type = ST_CONSTANT;
|
||||
|
||||
read_dword(ptr, &state->operation);
|
||||
if (state->operation >= ARRAY_SIZE(state_table))
|
||||
{
|
||||
WARN("Unknown state operation %u.\n", state->operation);
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
TRACE("Operation: %#x (%s)\n", state->operation, state_table[state->operation].name);
|
||||
|
||||
read_dword(ptr, &state->index);
|
||||
|
|
|
@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc
|
|||
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h,
|
||||
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
|
||||
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h}
|
||||
tags: {wine: cfc533b40d2d1426a8f05501152b28aa1ec78f07}
|
||||
tags: {wine: 2b5b069dd70ba328dc0ce660861ad802feae912c}
|
||||
|
|
Loading…
Reference in a new issue