Detect null pointer dereferences for many FILE-related functions

Ticket #1415: check for calling f{eof,read,close,...} with NULL
This commit is contained in:
Raphael Geissert 2011-01-30 02:34:58 -06:00
parent 49848fd752
commit 5137f5fb7f
1 changed files with 9 additions and 0 deletions

View File

@ -69,6 +69,15 @@ void CheckNullPointer::parseFunctionCall(const Token &tok, std::list<const Token
functionNames1.insert("strndup");
functionNames1.insert("strlen");
functionNames1.insert("strstr");
functionNames1.insert("fclose");
functionNames1.insert("feof");
functionNames1.insert("fread");
functionNames1.insert("fwrite");
functionNames1.insert("fseek");
functionNames1.insert("ftell");
functionNames1.insert("fgetpos");
functionNames1.insert("fsetpos");
functionNames1.insert("rewind");
}
// standard functions that dereference second parameter..