Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 832
    • Issues 832
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 240
    • Merge requests 240
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Gitlab will be updated February 2nd, between 8am and 9am EST (UTC-5). Gitlab will be offline during that time.

  • VTKVTK
  • VTKVTK
  • Issues
  • #856
Closed
Open
Issue 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
Time tracking