Advertisement
PVS-StudioWarnings

PVS-Studio warning V595 for Chromium

Nov 25th, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. bool ManagedUserService::UserMayLoad(
  2.   const extensions::Extension* extension,
  3.   string16* error) const
  4. {
  5.   if (extension_service &&
  6.       extension_service->GetInstalledExtension(extension->id()))
  7.     return true;
  8.  
  9.   if (extension) {
  10.     bool was_installed_by_default =
  11.       extension->was_installed_by_default();
  12.     .....
  13.   }
  14. }
  15.  
  16. This suspicious code was found in Chromium project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V595 The 'extension' pointer was utilized before it was verified against nullptr. Check lines: 277, 280. managed_user_service.cc 277
  19.  
  20. 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