Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
VTK
VTK
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 592
    • Issues 592
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 158
    • Merge Requests 158
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #856

Closed
Open
Created May 16, 2004 by Kitware Robot@kwrobotOwner

Segfault in vtkVolumeProVP1000Mapper::UpdateVolume() if data is not unsigned char or unsigned short

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


Passing data that is not unsigned short or unsigned char through vtkVolumeProVP1000Mapper causes a crash when UpdateVolume() is called. The following patch (generated with diff -Naur vtkVolumeProVP1000Mapper.cxx vtkVolumeProVP1000Mapper.cxx.new where the first file is version 1.26 from CVS) fixes the problem by avoiding dereferencing the Volume member if it is 0.

--- vtkVolumeProVP1000Mapper.cxx Mon Dec 29 13:36:29 2003 +++ vtkVolumeProVP1000Mapper.cxx.new Mon May 17 15:29:36 2004 @@ -769,10 +769,13 @@ correctionMatrixVLI[i][j] = correctionTransform->GetMatrix()->GetElement( i, j ); }

  • status = this->Volume->SetCorrectionMatrix( correctionMatrixVLI );
  • if ( status != kVLIOK )
  • if ( this->Volume ) {
  • vtkErrorMacro( << "Error setting the correction matrix: " << status );
  • status = this->Volume->SetCorrectionMatrix( correctionMatrixVLI );

  • if ( status != kVLIOK )

  •  {
  •  vtkErrorMacro( &lt;&lt; "Error setting the correction matrix: " &lt;&lt; status );
  •  }

    }

    status = this->Context->GetCamera().SetModelMatrix( modelMatrixVLI ); @@ -786,7 +789,8 @@ modelTransform->Delete();

    // Update the subvolume if it is reasonable

  • if ( this->SubVolume[0] >= 0 &&
  • if ( this->Volume &&
  •   this-&gt;SubVolume[0] &gt;= 0 &amp;&amp; 
      this-&gt;SubVolume[2] &gt;= 0 &amp;&amp;
      this-&gt;SubVolume[4] &gt;= 0 &amp;&amp;
      this-&gt;SubVolume[0] &lt; dataSize[0] &amp;&amp;
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None