PVS-StudioWarnings

PVS-Studio warning V557 for VTK

Nov 20th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. void vtkCursor2D::SetModelBounds(double bounds[6])
  2. {
  3.   this->SetModelBounds(bounds[0], bounds[1], bounds[2],
  4.                        bounds[3], bounds[6], bounds[5]);
  5. }
  6.  
  7. This is what should have been written here: bounds[4].
  8.  
  9. This suspicious code was found in VTK project by PVS-Studio static code analyzer.
  10. Warning message is:
  11. V557 Array overrun is possible. The '6' index is pointing beyond array bound. vtkGraphics vtkcursor2d.cxx 313
  12.  
  13. PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment