MantisBT - VTK
View Issue Details
0009381VTK(No Category)public2009-08-06 02:282016-08-12 09:55
akiyama 
Kitware Robot 
normalmajoralways
closedmoved 
 
 
0009381: memory leak and invalid acess in vtkXMLDataElement::RemoveAttribute
pointer is overwrited.
And, the pointer that should not be erased has been deleted.

--- vtkXMLDataElement.cxx 2008-11-20 17:08:08.000000000 +0900
+++ vtkXMLDataElement.cxx 2009-08-01 00:30:23.181167700 +0900
@@ -91,15 +91,14 @@
     {
     if(!strcmp(this->AttributeNames[i], name))
       {
+ delete [] this->AttributeNames[i];
+ delete [] this->AttributeValues[i];
       // Shift the other attributes
       for (j = i; j < this->NumberOfAttributes - 1; ++j)
         {
         this->AttributeNames[j] = this->AttributeNames[j + 1];
         this->AttributeValues[j] = this->AttributeValues[j + 1];
         }
- // Delete the last one
- delete [] this->AttributeNames[this->NumberOfAttributes - 1];
- delete [] this->AttributeValues[this->NumberOfAttributes - 1];
       --this->NumberOfAttributes;
       // this->AttributesSize is unchanged
       return;
No tags attached.
Issue History
2009-08-06 02:28akiyamaNew Issue
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:55Kitware RobotNote Added: 0037094
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved
2016-08-12 09:55Kitware RobotAssigned To => Kitware Robot

Notes
(0037094)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.