d3dcompiler: Add argument check in D3DReflect().
This commit is contained in:
parent
f8da57ca89
commit
14d8b51bac
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue