Checkio: fixed potential NULL-pointer dereference (Coverity-ScanId: CID 1113428).
This commit is contained in:
parent
5156481db4
commit
897533ab93
|
@ -417,7 +417,7 @@ static bool findFormat(unsigned int arg, const Token *firstArg,
|
|||
*formatStringTok = argTok;
|
||||
return true;
|
||||
} else if (Token::Match(argTok, "%var% [,)]") &&
|
||||
(argTok->variable() &&
|
||||
(argTok && argTok->variable() &&
|
||||
Token::Match(argTok->variable()->typeStartToken(), "char|wchar_t") &&
|
||||
(argTok->variable()->isPointer() ||
|
||||
(argTok->variable()->dimensions().size() == 1 &&
|
||||
|
|
Loading…
Reference in New Issue