You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ios_ktx2png: tiled check accepts block counts it has not seen #2890
KTX_reader.untile_astc_4x4 (from #2887) treats any texture with at least the padded block count as tiled. Two shapes it would get wrong, neither seen in the files below:
A tile-aligned texture in linear order, with HEAD word 12 = 0 and extra trailing blocks, would be reordered and come out scrambled.
The block count is floor divided, so a payload up to 15 bytes longer than a valid length still passes the count check.
Every SplashBoard and Widget .ktx in six corpus images (iOS 18 and 26, 2,632 files) is one of two shapes: exactly one block per 4x4 pixels with word 12 = 0, or the padded surface plus one block with word 12 = 1. None is tile-aligned.
Possible fix: treat a texture as tiled only at exactly padded + 1 blocks, or at exactly padded blocks with word 12 = 1; as linear only at exactly one block per 4x4 pixels; and leave anything else alone.
Activity
Refuse cut-short KTX textures instead of decoding them