Advertisement
PVS-StudioWarnings

PVS-Studio warning V597 for eMulePlus

Nov 26th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. static void MD5Transform(UINT4 state[4],
  2.                          unsigned char block[64])
  3. {
  4.   UINT4 a = state[0], b = state[1], c = state[2],
  5.         d = state[3], x[16];
  6.   ...
  7.   /* Zeroize sensitive information */
  8.   memset(x, 0, sizeof(x));
  9. }
  10.  
  11. This suspicious code was found in eMulePlus project by PVS-Studio static code analyzer.
  12. Warning message is:
  13. V597 The compiler could delete the 'memset' function call, which is used to flush 'x' buffer. The RtlSecureZeroMemory() function should be used to erase the private data.  emule md5sum.cpp 263
  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
Advertisement