Page MenuHomePhabricator

Possible nullptr dereferencing in plane geometry 3D mapper
Closed, WontfixPublic


There is an 'if' condition with an assignment and a nullptr check, then if the just assigned value is null, the variable is used.

I discovered this accidentally when I was browsing the code. It did not cause a crash for me, probably the condition never fulfills.;54c4495d75937c24e6ad1ef59f8a472bbff4f8b1$246

if ((surfacecreatorprop.IsNull()) || (surfacecreatorprop->GetSmartPointer().IsNull()) ||
    ((m_SurfaceCreator =
        dynamic_cast<PlaneGeometryDataToSurfaceFilter *>(surfacecreatorprop->GetSmartPointer().GetPointer()))
  surfacecreatorprop = SmartPointerProperty::New(m_SurfaceCreator);
  GetDataNode()->SetProperty("surfacegeometry", surfacecreatorprop);

Event Timeline

kislinsk triaged this task as Normal priority.Nov 25 2016, 10:49 AM
kislinsk edited projects, added MITK (2016-11); removed MITK.
kislinsk added a subscriber: kislinsk.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs