mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 03:08:19 +00:00
d3d10: Validate the data size in parse_fx10() (AFL).
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1f38359ec5
commit
e36630f702
|
@ -2180,6 +2180,12 @@ static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_s
|
|||
const char *ptr = data;
|
||||
DWORD unknown;
|
||||
|
||||
if (!require_space(0, 19, sizeof(DWORD), data_size))
|
||||
{
|
||||
WARN("Invalid data size %#x.\n", data_size);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
/* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
|
||||
read_dword(&ptr, &e->version);
|
||||
TRACE("Target: %#x\n", e->version);
|
||||
|
|
Loading…
Reference in a new issue