PVS-StudioWarnings

PVS-Studio warning V557 for ReactOS

Nov 19th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. static void move_dir_to_dir(....)
  2. {
  3.   ...
  4.   szFrom[lstrlenW(szFrom) + 1] = '\0';
  5.   ...
  6. }
  7.  
  8. Very suspicious code. Something different must have been intended.
  9.  
  10.  
  11. This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
  12. Warning message is:
  13. V557 Array overrun is possible. The value of 'lstrlenW (szFrom) + 1' index could reach 260. shell32 shlfileop.c 1482
  14.  
  15. 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