Skip to content

Commit 31b88ba

Browse files
Update checkbufferoverrun.cpp
1 parent 88a9426 commit 31b88ba

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/checkbufferoverrun.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ static const ValueFlow::Value *getBufferSizeValue(const Token *tok)
7171
it = std::find_if(tokenValues.cbegin(), tokenValues.cend(), [](const ValueFlow::Value& v) {
7272
return v.isContainerSizeValue() && v.isKnown();
7373
});
74+
return it == tokenValues.cend() ? nullptr : &*it;
7475
}
7576

7677
static const Token* getRealBufferTok(const Token* tok) {

0 commit comments

Comments
 (0)