Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/d3dx_helpers.c:
expected_src_data_size = (image->layer_pitch * image->layer_count) + header_size; if (src_data_size < expected_src_data_size) {
const uint32_t dxt10_info_only_flags = D3DX_IMAGE_INFO_ONLY | D3DX_IMAGE_SUPPORT_DXT10;
WARN("File is too short %u, expected at least %u bytes.\n", src_data_size, expected_src_data_size);
/* D3DX10/D3DX11 do not validate the size of the pixels, only the header. */
if (!(flags & D3DX_IMAGE_SUPPORT_DXT10))
/*
* D3DX10/D3DX11 do not validate the size of the pixels, only the header.
* However, if we're loading the image data, don't match native
* behavior.
*/
I'd mention explicitly that we're doing it to be safe and until we find reason to do otherwise.