|Anonymous | Login||2021-01-19 15:42 MSK|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0026400||Community||[OCCT] OCCT:Data Exchange||public||2015-07-04 20:57||2015-07-10 12:46|
|Product Version||[OCCT] 6.8.0|
|Target Version||Fixed in Version|
|Summary||0026400: Wrong STeP file crashes OC|
|Description||Importing 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?
|Tags||No tags attached.|
|Test case number|
|Attached Files||sample.zip (3,432,167 bytes) 2015-07-10 12:05|
|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|