CheckBufferOverrun: restore minsize code

This commit is contained in:
Daniel Marjamäki 2019-03-17 20:34:49 +01:00
parent 03f8535c71
commit b53a2e5dc4
1 changed files with 2 additions and 0 deletions

View File

@ -378,6 +378,8 @@ static bool checkBufferSize(const Token *ftok, const Library::ArgumentChecks::Mi
if (arg && arg2 && arg->hasKnownIntValue() && arg2->hasKnownIntValue())
return (arg->getKnownIntValue() * arg2->getKnownIntValue()) <= bufferSize;
break;
case Library::ArgumentChecks::MinSize::Type::VALUE:
return minsize.value <= bufferSize;
case Library::ArgumentChecks::MinSize::Type::NONE:
break;
};