PVS-StudioWarnings

PVS-Studio warning V597 for TPP

Nov 12th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. void CSHA1::Final()
  2. {
  3.   UINT_8 finalcount[8];
  4.   ...
  5.   memset(finalcount, 0, 8);
  6.   Transform(m_state, m_buffer);
  7. }
  8.  
  9. This suspicious code was found in TPP project by PVS-Studio static code analyzer.
  10. Warning message is:
  11. V597 The compiler could delete the 'memset' function call, which is used to flush 'finalcount' buffer. The RtlSecureZeroMemory() function should be used to erase the private data. pwiz sha1.cpp 205
  12.  
  13. 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