mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-07 18:30:55 +03:00
0030992: Foundation Classes - heap-buffer-overflow reported by Clang address sanitizer in BSplCLib::BuildKnots()
Inconsistent code for guessing bspline span index is removed in Geom_OsculatingSurface::BuildOsculatingSurface().
This commit is contained in:
parent
c2bcd98369
commit
9e3045dae1
@ -446,7 +446,6 @@ Standard_Boolean Geom_OsculatingSurface::BuildOsculatingSurface
|
|||||||
const Handle(Geom_BSplineSurface)& BS,
|
const Handle(Geom_BSplineSurface)& BS,
|
||||||
Handle(Geom_BSplineSurface)& BSpl) const
|
Handle(Geom_BSplineSurface)& BSpl) const
|
||||||
{
|
{
|
||||||
Standard_Integer i, j;
|
|
||||||
Standard_Boolean OsculSurf=Standard_True;
|
Standard_Boolean OsculSurf=Standard_True;
|
||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
std::cout<<"t = "<<Param<<std::endl;
|
std::cout<<"t = "<<Param<<std::endl;
|
||||||
@ -492,7 +491,7 @@ Standard_Boolean Geom_OsculatingSurface::BuildOsculatingSurface
|
|||||||
MaxUDegree = (Standard_Integer ) udeg;
|
MaxUDegree = (Standard_Integer ) udeg;
|
||||||
MaxVDegree = (Standard_Integer ) vdeg;
|
MaxVDegree = (Standard_Integer ) vdeg;
|
||||||
|
|
||||||
for (i=1;i<=2;i++)
|
for (Standard_Integer i = 1; i <= 2; i++)
|
||||||
{
|
{
|
||||||
PolynomialUIntervals->ChangeValue(i) = i-1;
|
PolynomialUIntervals->ChangeValue(i) = i-1;
|
||||||
PolynomialVIntervals->ChangeValue(i) = i-1;
|
PolynomialVIntervals->ChangeValue(i) = i-1;
|
||||||
@ -560,8 +559,6 @@ Standard_Boolean Geom_OsculatingSurface::BuildOsculatingSurface
|
|||||||
|
|
||||||
VLocalIndex = 0;
|
VLocalIndex = 0;
|
||||||
ULocalIndex = 0;
|
ULocalIndex = 0;
|
||||||
for(j = 1; j <= SVKnot; j++) VLocalIndex += BS->VMultiplicity(j);
|
|
||||||
for(i = 1; i <= SUKnot; i++) ULocalIndex += BS->UMultiplicity(i);
|
|
||||||
ucacheparameter = BS->UKnot(SUKnot);
|
ucacheparameter = BS->UKnot(SUKnot);
|
||||||
vcacheparameter = BS->VKnot(SVKnot);
|
vcacheparameter = BS->VKnot(SVKnot);
|
||||||
vspanlength = BS->VKnot(SVKnot + 1) - BS->VKnot(SVKnot);
|
vspanlength = BS->VKnot(SVKnot + 1) - BS->VKnot(SVKnot);
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
puts "TODO OCC24621 Windows: An exception was caught"
|
|
||||||
puts "TODO OCC24621 Windows: \\*\\* Exception \\*\\*.*"
|
|
||||||
puts "TODO OCC24621 Windows: TEST INCOMPLETE"
|
|
||||||
|
|
||||||
puts "========"
|
puts "========"
|
||||||
puts "OCC24621"
|
puts "OCC24621: F a i l e d to build Geom_OffsetSurface on B-Spline"
|
||||||
puts "========"
|
puts "========"
|
||||||
puts ""
|
puts ""
|
||||||
##################################################
|
|
||||||
# Failed to build Geom_OffsetSurface on B-Spline
|
|
||||||
##################################################
|
|
||||||
|
|
||||||
restore [locate_data_file bug24621_bs.draw] bs
|
restore [locate_data_file bug24621_bs.draw] bs
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user