mirror of
https://github.com/CloudCompare/PoissonRecon.git
synced 2026-08-30 00:50:28 +08:00
Memory Access Out of Bounds Fix
Added a necessary check to avoid out-of-bounds memory access. (Bug caught by Daniel G.)
This commit is contained in:
@@ -268,8 +268,11 @@ Real Octree< Real >::GetIsoValue( const DenseNodeData< Real , FEMDegree >& solut
|
||||
}
|
||||
nodeValues[i] = value;
|
||||
int idx = nodeWeights.index( _sNodes.treeNodes[i] );
|
||||
Real w = nodeWeights.data[ idx ];
|
||||
if( w!=0 ) isoValue += value * w , weightSum += w;
|
||||
if( idx!=-1 )
|
||||
{
|
||||
Real w = nodeWeights.data[ idx ];
|
||||
if( w!=0 ) isoValue += value * w , weightSum += w;
|
||||
}
|
||||
}
|
||||
}
|
||||
metSolution.resize( 0 );
|
||||
|
||||
Reference in New Issue
Block a user