Matteo Bruni (@Mystral) commented about dlls/d3dcompiler_43/blob.c:
static HRESULT d3dcompiler_get_blob_part(const void *data, SIZE_T data_size, D3D_BLOB_PART part, UINT flags, ID3DBlob **blob) {
- const struct vkd3d_shader_code src_dxbc = {.code = data, .size = data_size}; struct vkd3d_shader_dxbc_section_desc *sections;
- struct vkd3d_shader_dxbc_desc src_dxbc_desc; struct vkd3d_shader_code dst_dxbc; unsigned int section_count, i;
struct dxbc src_dxbc; HRESULT hr; int ret;
if (!data || !data_size || flags || !blob)
- if (!data || data_size < DXBC_HEADER_SIZE || flags || !blob)
Ideally this would be a separate change with a test to validate its correctness (AFAICS it is correct but there isn't a test already for it).
Given that I wrote it anyway, attaching the test... [0001-d3dcompiler-tests-Add-a-couple-tests-for-minimum-size-.txt](/uploads/29bc1b149695fe26905967b86b53bd76/0001-d3dcompiler-tests-Add-a-couple-tests-for-minimum-size-.txt)