mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-utils: Check for a NULL 'blob' pointer in D3DCreateBlob().
This commit is contained in:
committed by
Alexandre Julliard
parent
eaf35c394d
commit
47d4097efa
Notes:
Alexandre Julliard
2023-10-16 23:02:26 +02:00
Approved-by: Matteo Bruni (@Mystral) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/405
@@ -537,6 +537,12 @@ HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3DBlob **blob)
|
||||
|
||||
TRACE("data_size %lu, blob %p.\n", data_size, blob);
|
||||
|
||||
if (!blob)
|
||||
{
|
||||
WARN("Invalid 'blob' pointer specified.\n");
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
if (!(data = vkd3d_calloc(data_size, 1)))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
Reference in New Issue
Block a user