[Insight-developers] Invalid read in ConnectedComponentImageFilter

Bill Lorensen bill.lorensen at gmail.com
Sun Feb 11 08:37:15 EST 2007


Gaetan,

In ConnectedComponentImageFilter, valgrind is giving an
UMR ==8366== Invalid read of size 1
at
itkConnectedComponentImageFilter.txx:132
It seems that inLineIt is being incremented after the IsAtEndOfLine(),
causing the invalid read.

   127 :


 while ((PVal != NumericTraits<InputPixelType>::Zero) &&
 128 :


 (! inLineIt.IsAtEndOfLine()))
 129 :


 {
 130 :


 ++length;
 131 :


 ++inLineIt;
 132 :


 PVal = inLineIt.Get();
 133 :


 }
 134

Can you take a look at this?

The valgrind URL is:
http://www.itk.org/Testing/Sites/voxel.jouy.inra.fr/Linux-gcc4.0.1-memtest1/20070210-0100-Nightly/DynamicAnalysis/__Testing_Code_Algorithms_itkThresholdMaximumConnectedComponentsImageFilterTest2.html

Thanks,

Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20070211/58a7e73e/attachment.html


More information about the Insight-developers mailing list