Advertisement
PVS-StudioWarnings

PVS-Studio warning V595 for OpenSSL

Nov 26th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. int SSL_shutdown(SSL *s)
  2. {
  3.   if (s->handshake_func == 0)
  4.   {
  5.     SSLerr(SSL_F_SSL_SHUTDOWN, SSL_R_UNINITIALIZED);
  6.     return -1;
  7.   }
  8.  
  9.   if ((s != NULL) && !SSL_in_init(s))
  10.     return(s->method->ssl_shutdown(s));
  11.   else
  12.     return(1);
  13.   }
  14.   ....
  15. }
  16.  
  17. This suspicious code was found in OpenSSL project by PVS-Studio static code analyzer.
  18. Warning message is:
  19. V595 The 's' pointer was utilized before it was verified against nullptr. Check lines: 1013, 1019. ssl_lib.c 1013
  20.  
  21. 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