Should Ktx2Header length check be changed?
xPaw opened this issue · 1 comments
xPaw commented
SharpGLTF/src/SharpGLTF.Core/Memory/MemoryImage.cs
Lines 492 to 493 in 9c6a4c0
When running in a debugger, I get a IndexOutOfRangeException here on the MemoryMarshal.Cast call. Should the data.Count
check be changed from 12 to 48 because of all the integers in the struct?
It works fine due to the try/catch in _IsKtx2Image.
vpenades commented
you're right, It should not use a hardcoded value.
This class is used for basic validation, and at the time of writing I could not find nearly enough examples to work with...