Advertisement
PVS-StudioWarnings

PVS-Studio warning V576 for ReactOS

Nov 27th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. BOOL CALLBACK EnumPickIconResourceProc(HMODULE hModule,
  2.     LPCWSTR lpszType,
  3.     LPWSTR lpszName,
  4.     LONG_PTR lParam
  5. )
  6. {
  7.   ....
  8.   swprintf(szName, L"%u", lpszName);
  9.   ....
  10. }
  11.  
  12. This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V576 Incorrect format. Consider checking the third actual argument of the 'swprintf' function. To print the value of pointer the '%p' should be used. dialogs.cpp 66
  15.  
  16. 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
Advertisement