PVS-StudioWarnings

PVS-Studio warning V512 for smtp_ssl

Nov 20th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. void MD5::finalize () {
  2.   ...
  3.   uint1 buffer[64];
  4.   ...
  5.   // Zeroize sensitive information
  6.   memset (buffer, 0, sizeof(*buffer));
  7.   ...
  8. }
  9.  
  10. Most likely this is what should be written here: memset (buffer, 0, sizeof(buffer));
  11.  
  12. This suspicious code was found in smtp_ssl project by PVS-Studio static code analyzer.
  13. Warning message is:
  14. V512 A call of the 'memset' function will lead to a buffer overflow or underflow. CSmtp md5.cpp 212
  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