Commit 14d8b51b authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dcompiler: Add argument check in D3DReflect().

parent f8da57ca
......@@ -128,9 +128,22 @@ HRESULT WINAPI D3DReflect(const void *data, SIZE_T data_size, REFIID riid, void
{
struct d3dcompiler_shader_reflection *object;
HRESULT hr;
const DWORD *temp = data;
TRACE("data %p, data_size %lu, riid %s, blob %p\n", data, data_size, debugstr_guid(riid), reflector);
if (!data || data_size < 32)
{
WARN("Invalid argument supplied.\n");
return D3DERR_INVALIDCALL;
}
if (temp[6] != data_size)
{
WARN("Wrong size supplied.\n");
return E_FAIL;
}
if (!IsEqualGUID(riid, &IID_ID3D11ShaderReflection))
{
WARN("Wrong riid %s, accept only %s!\n", debugstr_guid(riid), debugstr_guid(&IID_ID3D11ShaderReflection));
......
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