PVS-StudioWarnings

PVS-Studio warning V595 for ACE

Nov 13th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. JAWS_IO_Reactive_Transmit::handle_output_source
  2.   (ACE_HANDLE handle)
  3. {
  4.   ACE_Message_Block *mb = this->source_buf_;
  5.   ...
  6.   if (mb->length () > 0)
  7.     result = this->handle_output_mb (handle, mb);
  8.   if (result < 0) {
  9.     ...
  10.   } else if (mb == 0 && this->source_ == ACE_INVALID_HANDLE)
  11.     this->source_buf_ = 0;
  12.   ...
  13. }
  14.  
  15. This suspicious code was found in ACE project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V595 The 'mb' pointer was utilized before it was verified against nullptr. Check lines: 455, 463. JAWS3 reactive_io.cpp 455
  18.  
  19. 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