[vtk-developers] Help with vtkDataSetSurfaceFilter.cxx:2144...

Sean McBride sean at rogue-research.com
Fri Mar 8 15:50:52 EST 2013


Hi folks,

On 18 different VTK tests, clang's sanitizer complains about:

Filters/Geometry/vtkDataSetSurfaceFilter.cxx:2144:7: runtime error: index 4 out of bounds for type 'vtkIdType [4]'

I believe it is right to complain.  When 'numPts' is > 4, the write to 'ptArray' goes past the end.  The read of 'tab' is ok, as it is allocated to be big enough:

vtkIdType* tab = new vtkIdType[numPts];

But AFAICT, 'ptArray' is always 4 items big, despite the existence of the sizeofFastQuad() function and the comment "actually a variable length array.  MUST be last"

Someone out there know this code?

Thanks,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtk-developers mailing list