Fixed CID-1234716: Dereference after null check in lib/checkio.cpp
This commit is contained in:
parent
e8f7279039
commit
8a15486370
|
@ -181,8 +181,8 @@ void CheckIO::checkFileUsage()
|
|||
(windows && tok->str() == "_fseeki64")) {
|
||||
if (_settings->isEnabled("portability") && tok->str() == "fflush") {
|
||||
fileTok = tok->tokAt(2);
|
||||
|
||||
if (fileTok && fileTok->str() == "stdin")
|
||||
if (fileTok) {
|
||||
if (fileTok->str() == "stdin")
|
||||
fflushOnInputStreamError(tok, fileTok->str());
|
||||
else {
|
||||
Filepointer& f = filepointers[fileTok->varId()];
|
||||
|
@ -190,6 +190,7 @@ void CheckIO::checkFileUsage()
|
|||
fflushOnInputStreamError(tok, fileTok->str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fileTok = tok->tokAt(2);
|
||||
operation = Filepointer::POSITIONING;
|
||||
|
|
Loading…
Reference in New Issue