View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0001455 | VTK | (No Category) | public | 2005-01-04 09:45 | 2011-01-13 17:00 | ||||
Reporter | Joris Van Zwieten | ||||||||
Assigned To | Mathieu Malaterre | ||||||||
Priority | low | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0001455: Off by one bug in vtkImageExtractComponents | ||||||||
Description | In function: void vtkImageExtractComponents::ThreadedExecute() (see http://public.kitware.com/cgi-bin/viewcvs.cgi/Imaging/vtkImageExtractComponents.cxx?rev=1.31&view=markup [^] ) We find the following code: --------- // make sure we can get all of the components. max = inData->GetNumberOfScalarComponents(); for (idx = 0; idx < this->NumberOfComponents; ++idx) { if (this->Components[idx] > max) { vtkErrorMacro("Execute: Component " << this->Components[idx] << " is not in input."); return; } } --------- The check on max should be greater than _or equal_, because if a vtkImageData object has N scalar components, the maximum index is N-1, not N. Also, it might be wise to check for < zero as well. | ||||||||
Tags | No tags attached. | ||||||||
Project | |||||||||
Type | |||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0001859) Mathieu Malaterre (developer) 2005-01-06 11:09 |
Fixed in CVS. Thank you Joris. $ cvs ci -m"BUG: Fix Bug 0001455 - Off by one bug in vtkImageExtractComponents. Thanks to Joris van Zwieten for patch" vtkImageExtractComponents.cxx /cvsroot/VTK/VTK/Imaging/vtkImageExtractComponents.cxx,v <-- vtkImageExtractComponents.cxx new revision: 1.32; previous revision: 1.31 |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-11-29 17:59 | Mathieu Malaterre | Source_changeset_attached | => VTK master fb5e6b5d |
2011-01-13 17:00 | Source_changeset_attached | => VTK master a2bd8391 | |
2011-01-13 17:00 | Source_changeset_attached | => VTK master 020ef709 | |
2011-06-16 13:11 | Zack Galbreath | Category | => (No Category) |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |