8000 dxtbx::boost_python::read_uint32 fails with unsigned int's larger than signed int's max size · Issue #806 · cctbx/dxtbx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
dxtbx::boost_python::read_uint32 fails with unsigned int's larger than signed int's max size #806
Open
@luc-j-bourhis

Description

@luc-j-bourhis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0