PVS-StudioWarnings

PVS-Studio warning V557 for WildMagic5

Nov 13th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. void Triangles::UpdateModelTangentsUseTCoords(....)
  2. {
  3.   ....
  4.   Float2 locTCoord[2];
  5.   int curr;
  6.   for (curr = 0; curr < 3; ++curr)
  7.   {
  8.     ....
  9.     locTCoord[curr] = vba.TCoord<Float2>(0, k);
  10.   }
  11.   ....
  12. }
  13.  
  14. This suspicious code was found in WildMagic5 project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V557 Array overrun is possible. The value of 'curr' index could reach 2. wm5triangles.cpp 365
  17.  
  18. 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