PVS-StudioWarnings

PVS-Studio warning V597 for samba

Nov 18th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. static void
  2. calc(struct md2 *m, const void *v)
  3. {
  4.   unsigned char x[48], L;
  5.   ....
  6.   memset(x, 0, sizeof(x));
  7. }
  8.  
  9. This suspicious code was found in samba 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 'x' buffer. The RtlSecureZeroMemory() function should be used to erase the private data. md2.c 91
  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