PVS-StudioWarnings

PVS-Studio warning V597 for NetXMS

Nov 17th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. void I_SHA1Final(....)
  2. {
  3.   unsigned char finalcount[8];
  4.   ....
  5.   memset(finalcount, 0, 8);
  6.   SHA1Transform(context->state, context->buffer);
  7. }
  8.  
  9. This suspicious code was found in NetXMS 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. sha1.cpp 233
  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