Commit 921bade0 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3d10/effect: Validate preshader blob size for index expressions.

parent 1c7323b1
...@@ -2633,6 +2633,12 @@ static HRESULT parse_fx10_property_assignment(const char *data, size_t data_size ...@@ -2633,6 +2633,12 @@ static HRESULT parse_fx10_property_assignment(const char *data, size_t data_size
data_ptr = data + code_offset; data_ptr = data + code_offset;
read_dword(&data_ptr, &blob_size); read_dword(&data_ptr, &blob_size);
if (!require_space(code_offset, 1, sizeof(uint32_t) + blob_size, data_size))
{
WARN("Invalid offset %#x (data size %#lx).\n", code_offset, (long)data_size);
return E_FAIL;
}
dep.id = id; dep.id = id;
dep.idx = idx; dep.idx = idx;
dep.operation = operation; dep.operation = operation;
......
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