]> OCCT Git - occt.git/commit
0032929: Modeling Algorithms - Crash in PerformIntersectionAtEnd after deletion of...
authorCharlemagne Lasse <charlemagnelasse@gmail.com>
Wed, 13 Apr 2022 09:54:30 +0000 (11:54 +0200)
committersmoskvin <smoskvin@opencascade.com>
Wed, 20 Jul 2022 09:30:00 +0000 (12:30 +0300)
commitb776f4ee076fd5d6bc097a5a2df067bcb15254f4
tree10b68278587a3c974bae86fc922077a7ac26fa38
parent90e61140aabf25e940260b366d84a30961be0a22
0032929: Modeling Algorithms - Crash in PerformIntersectionAtEnd after deletion of surfdata

When creating a fillet, num is calculated via ChFi3d_IndexOfSurfData. If it
returns just the number of entries in surfdata, it can happen that this
value becomes invalid when handling the case "two faces common to the edge
are found". When both components are on an arc, there will be num removed
from the surfdata.

num would then be larger than the number of entries surfdata. The derived
num1 is therefore also incorrect. The subsequent usage of this
value will either:

* Debug build: cause an out of bounds exception in ChangeValue
  (`SeqFil.ChangeValue(num)`)
* Release build: cause a segfault when retrieving it via index num1
  (`SeqFil(num1)`)

num + num1 must be recalculated after the deletion happens to correctly
calculate the fillet.

Signed-off-by: Charlemagne Lasse <charlemagnelasse@gmail.com>
src/ChFi3d/ChFi3d_Builder_C1.cxx
tests/bugs/modalg_8/bug32929 [new file with mode: 0644]