Skip to content

Fix a memory overrun in vtkImageStencilIterator.

David Gobbi requested to merge dgobbi/vtk:stencil-iterator-overrun-6.3 into master

If the stencil extent was smaller than the image extent, then the code incremented the span list pointer upon reaching the first voxel within the stencil extent, even though the pointer was already at the correct location for the first voxel in the stencil extent. The extra increment could lead to a buffer overrun and unpredictable behavior resulting in random crashes.

Merge request reports