MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026400Community[OCCT] OCCT:Data Exchangepublic2015-07-04 20:572015-07-10 12:46
Reporterventu 
Assigned Togka 
PrioritynormalSeverityminor 
StatusnewResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target VersionFixed in Version 
Summary0026400: Wrong STeP file crashes OC
DescriptionImporting a STeP file with "REPRESENTATION_ITEM()" in it crashes the program.
AFAICT REPRESENTATION_ITEM should have a NAME parameter, so the file is wrong.
Still I think it could easily be imported (or at least gracefully rejected).

What happens is that the following line (RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx:228):
    if (!data->CheckNbParams(num,1,ach,"representation_item")) return;
finds an incorrect number of parameters and returns immediately.
So ent->Init is not called; the entity is thus invalid, but still translated later.
The crash happens in StepGeom_BSplineCurve::Degree() which is called on a null reference from StepToGeom_MakeBSplineCurve::Convert while handling the invalid entity.

Maybe it would be possible to set aName to an emtpy string in RWStepGeom_RWBSplineCurveWithKnotsAndRationalBSplineCurve.cxx, when such a parameter is missing?
TagsNo tags attached.
Test case number
Attached Fileszip file icon sample.zip (3,432,167 bytes) 2015-07-10 12:05

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2015-07-04 20:57 ventu New Issue
2015-07-04 20:57 ventu Assigned To => gka
2015-07-10 12:05 ventu File Added: sample.zip


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker