PVS-StudioWarnings

PVS-Studio warning V522 for ReactOS

Nov 19th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. ir_texture *
  2. ir_reader::read_texture(s_expression *expr)
  3. {
  4.   s_symbol *tag = NULL;
  5.   ....
  6.   } else if (MATCH(expr, other_pattern)) {
  7.     op = ir_texture::get_opcode(tag->value());
  8.     if (op == -1)
  9.       return NULL;
  10.   }
  11.   ....
  12. }
  13.  
  14. This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V522 Dereferencing of the null pointer 'tag' might take place. ir_reader.cpp 904
  17.  
  18. 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