Advertisement
PVS-StudioWarnings

PVS-Studio warning V597 for tor-project

Nov 27th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. int
  2. crypto_pk_private_sign_digest(....)
  3. {
  4.   char digest[DIGEST_LEN];
  5.   ....
  6.   memset(digest, 0, sizeof(digest));
  7.   return r;
  8. }
  9.  
  10. This suspicious code was found in tor-project project by PVS-Studio static code analyzer.
  11. Warning message is:
  12. V597 The compiler could delete the 'memset' function call, which is used to flush 'digest' buffer. The RtlSecureZeroMemory() function should be used to erase the private data. crypto.c 1015
  13.  
  14. 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