API ONX_Model::Read hangs when reading a fuzz model

Hi, experts!

There is a fuzz model which hangs at ONX_Model::Read. Here is the model:
Balsa-simplfied-5rr2zasb10o.3dm (2.3 MB)

Here is the code snippet (strFileName should be replaced with real path) may help to produce this isse:

    ONX_ErrorCounter* m_errorCounter = new ONX_ErrorCounter(); 
   
    // Create a new OpenNurbs Model
    ONX_Model* m_pONxModel = new ONX_Model();

    m_errorCounter->ClearLibraryErrorsAndWarnings();
    // Read OpenNurbs file
    FILE* pONArchiveFile = ON::OpenFile(strFileName, L"rb");

    // create archive object from file pointer
    ON_BinaryFile archive(ON::archive_mode::read3dm, pONArchiveFile);

    // read the contents of the file into "model"
    bool rc = m_pONxModel->Read(archive);

Below is version info of library that I used:

Could you please help to check?

Much thanks
Lei

Hi, welcome :slight_smile:

Your model doesn’t load into Rhino:


(and many other errors follow).

How was this file created?

Hello, thank you for helping to look into this issue!

Yes I think you are right. This model is bad. it is a product of minifuzz and its aim is to find vulnerabilities and bugs in codes.
The model itself is destroyed and probably can’t be opened by CAD applications. When using this model to test our projects, I found it hanged at ONX_Model::Read. So I reported this ticked.

Regards
Lei

Ok, thanks for that. I have reported this as RH-86791.

1 Like

Thanks a lot!