On Thu Oct 9 17:38:35 2025 +0000, Vibhav Pant wrote:
Yes, there are a few places where I need to add bounds checks, but I generally do check for them, thanks.
There are a few examples of that pattern in d3d10/effect.c or dwrite/opentype.c, where we basically check that reading next structured fragment makes sense with given {offset,size} vs {position,overall_size}, something like that. I'm sure reading shader blobs is also done in a similar way.
And if API matches data format closely, we won't really need to allocate copies of data elements on heap, but instead could simply navigate mapped memory with offsets (I think you're already doing that).