Skip to content

Commit 897533a

Browse files
committed
Checkio: fixed potential NULL-pointer dereference (Coverity-ScanId: CID 1113428).
1 parent 5156481 commit 897533a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/checkio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static bool findFormat(unsigned int arg, const Token *firstArg,
417417
*formatStringTok = argTok;
418418
return true;
419419
} else if (Token::Match(argTok, "%var% [,)]") &&
420-
(argTok->variable() &&
420+
(argTok && argTok->variable() &&
421421
Token::Match(argTok->variable()->typeStartToken(), "char|wchar_t") &&
422422
(argTok->variable()->isPointer() ||
423423
(argTok->variable()->dimensions().size() == 1 &&

0 commit comments

Comments
 (0)