PVS-StudioWarnings

PVS-Studio warning V522 for Chromium

Nov 17th, 2014
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. bool ChromeFrameNPAPI::Invoke(....)
  2. {
  3.   ChromeFrameNPAPI* plugin_instance =
  4.     ChromeFrameInstanceFromNPObject(header);
  5.   if (!plugin_instance &&
  6.       (plugin_instance->automation_client_.get()))
  7.     return false;
  8.   ...
  9. }
  10.  
  11. This suspicious code was found in Chromium project by PVS-Studio static code analyzer.
  12. Warning message is:
  13. V522 Dereferencing of the null pointer 'plugin_instance' might take place. Check the logical condition.  chrome_frame_npapi  chrome_frame_npapi.cc  517
  14.  
  15. 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