Description
Unless I am missing something, the implementation in dxtbx/boost_python/ext.cpp
can't work in the general case: data are read as unsigned int
but then stashed into an array of signed int
on most platform. This is guarded by a DXTBX_ASSERT
but it will just crash the program. It happened to us during the import of Bruker frames, specifically the 4-byte overflow table. It uses unsigned int
, whose maximum value of 4,294,967,295 may actually happened. Such frames would then trigger the DXTBX_ASSERT
that guards against values greater than 32,767 for the size of such int
's.
It happened in the context of #802 as @dagewa used _4b = read_uint32
specifically for that overflow table. But more generally, I don't see any function that can handle the true size of unsigned int's in dxtbx/boost_python/ext.cpp
.