PVS-StudioWarnings

PVS-Studio warning V597 for Apache

Nov 25th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. static void MD4Transform(
  2.   apr_uint32_t state[4], const unsigned char block[64])
  3. {
  4.   apr_uint32_t a = state[0], b = state[1],
  5.                c = state[2], d = state[3],
  6.                x[APR_MD4_DIGESTSIZE];
  7.   ....
  8.   /* Zeroize sensitive information. */
  9.   memset(x, 0, sizeof(x));
  10. }
  11.  
  12. This suspicious code was found in Apache project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. 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. apr apr_md4.c 362
  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