[vtk-developers] BUG: Missing cast operator in vtkImageAccumulate

Pavel Pokutnev pavel.pokutnev at googlemail.com
Sun Apr 11 14:52:10 EDT 2010


Hello vtk-developers,

FYI: I just submitted a bug, that causes a crash due to buffer overflow.

There is a missing cast operator in vtkImageAccumulate.cxx line 222.

The line:
    sumSqr[idxC] += (*subPtr * *subPtr);
should be:
    sumSqr[idxC] += (static_cast<double>(*subPtr) * (*subPtr));

Bug Tracker link:
http://public.kitware.com/Bug/view.php?id=10534

I hope the fix can be made until VTK 5.6 release.

Best regards!



More information about the vtk-developers mailing list