View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0008960 | ITK | public | 2009-05-05 11:05 | 2010-11-07 01:57 | |||||
Reporter | Luis Ibanez | ||||||||
Assigned To | Luis Ibanez | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0008960: Image Iterators do not validate region in constructor | ||||||||
Description | The constructors of the ImageRegionConstIterator and ImageRegionConstIteratorWithIndex do not verify that the region passed as argument is fully contained in the image Buffered Region. | ||||||||
Additional Information | As a result it is possible to pass as argument to the constructor, a region that is not inside of the image and to force the iterator to produce pointers that are outside of the image buffer. | ||||||||
Tags | No tags attached. | ||||||||
Resolution Date | |||||||||
Sprint | |||||||||
Sprint Status | backlog | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0016288) Luis Ibanez (manager) 2009-05-05 11:07 |
Suggested patch: Index: itkImageConstIterator.h =================================================================== RCS file: /cvsroot/Insight/Insight/Code/Common/itkImageConstIterator.h,v retrieving revision 1.23 diff -r1.23 itkImageConstIterator.h 175a176,183 > const RegionType & bufferedRegion = m_Image->GetBufferedRegion(); > > if( ! bufferedRegion.IsInside( m_Region ) ) > { > itkGenericExceptionMacro("Region " << m_Region > << " is outside of buffered region " << bufferedRegion ); > } > Index: itkImageConstIteratorWithIndex.txx =================================================================== RCS file: /cvsroot/Insight/Insight/Code/Common/itkImageConstIteratorWithIndex.txx,v retrieving revision 1.27 diff -r1.27 itkImageConstIteratorWithIndex.txx 84a85,92 > const RegionType & bufferedRegion = m_Image->GetBufferedRegion(); > > if( ! bufferedRegion.IsInside( m_Region ) ) > { > itkGenericExceptionMacro("Region " << m_Region > << " is outside of buffered region " << bufferedRegion ); > } > |
(0016289) Luis Ibanez (manager) 2009-05-05 11:17 |
Discussion in the ITK Developers list. http://www.itk.org/mailman/private/insight-developers/2009-May/012427.html [^] |
(0022979) Luis Ibanez (manager) 2010-11-07 01:57 |
The following expression is now in itkImageConstIterator.h lines 175-180: if ( region.GetNumberOfPixels() > 0 ) // If region is non-empty { const RegionType & bufferedRegion = m_Image->GetBufferedRegion(); itkAssertOrThrowMacro( ( bufferedRegion.IsInside(m_Region) ), "Region " << m_Region << " is outside of buffered region " << bufferedRegion ); } |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-05-05 11:05 | Luis Ibanez | New Issue | |
2009-05-05 11:06 | Luis Ibanez | Summary | ImageItartor doesn't validate region in constructor => Image Iterators do not validate region in constructor |
2009-05-05 11:07 | Luis Ibanez | Note Added: 0016288 | |
2009-05-05 11:17 | Luis Ibanez | Note Added: 0016289 | |
2009-05-06 18:39 | Luis Ibanez | Status | new => assigned |
2009-05-06 18:39 | Luis Ibanez | Assigned To | => Luis Ibanez |
2010-11-07 01:57 | Luis Ibanez | Sprint Status | => backlog |
2010-11-07 01:57 | Luis Ibanez | Note Added: 0022979 | |
2010-11-07 01:57 | Luis Ibanez | Status | assigned => closed |
2010-11-07 01:57 | Luis Ibanez | Resolution | open => fixed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |