]> OCCT Git - occt-copy.git/commit
0031292: Data Exchange - SIGSEGV on reading STEP file with references to invalid...
authormsv <msv@opencascade.com>
Fri, 10 Jan 2020 17:59:51 +0000 (20:59 +0300)
committermsv <msv@opencascade.com>
Fri, 10 Jan 2020 19:28:48 +0000 (22:28 +0300)
commit068969acefda7e7062a12e3a048c618dd5278b54
tree0f4c57e72a139eb71499c4a8b06c19196906ce24
parent56609574c654b15a972268516e27130830331ad8
0031292: Data Exchange - SIGSEGV on reading STEP file with references to invalid entities

Changes:

- in StepData_StepReaderData::ReadEntity, make sure that entity handle is not null before calling IsKind() of it.

- in StepData_StepReaderData::SetEntityNumbers, do not invert the sign of entity number of referenced parameter if the second pass is not required. Otherwise, the number -1 (obviously invalid) becomes 1 (invalid, but not obviously) without further correction of it.

- in StepData_UndefinedEntity::ReadRecord, consider the case when the entity number is positive but refers to non-existing entity. In this case literal value will be used instead of null entity for the problematic parameter.
src/StepData/StepData_StepReaderData.cxx
src/StepData/StepData_UndefinedEntity.cxx