1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025559: SIGSEGV in TKMath when computing max tolerance of curve on surface

Fixed possible being outside the boundaries. Changed check math_Recipes to work with NaN, Inf, Ind.

Test case for issue CR25559
This commit is contained in:
aml
2014-12-11 16:17:04 +03:00
committed by bugmaster
parent d315303da2
commit b49eaa701f
3 changed files with 34 additions and 4 deletions

View File

@@ -205,10 +205,13 @@ Standard_Integer LU_Decompose(math_Matrix& a,
for(k = 1; k < j; k++)
sum -= a(i,k) * a(k,j);
a(i,j) = sum;
if((dum = vv(i) * fabs(sum)) >= big) {
big = dum;
imax = i;
// Note that comparison is made so as to have imax updated even if argument is NAN, Inf or IND, see #25559
if((dum = vv(i) * fabs(sum)) < big)
{
continue;
}
big = dum;
imax = i;
}
if(j != imax) {
for(k = 1; k <= n; k++) {