Fixed #1274 (false positive: Dangerous usage of strncat)

This commit is contained in:
Monika Lukow 2010-01-31 11:43:54 +01:00
parent 4f30468c80
commit a0e96be0c3
1 changed files with 1 additions and 1 deletions

View File

@ -538,7 +538,7 @@ void CheckBufferOverrun::checkScope(const Token *tok, const char *varname[], con
if (varid > 0 && Token::Match(tok, "strncat ( %varid% , %any% , %num% )", varid))
{
int n = std::atoi(tok->strAt(6));
if (n >= (total_size - 1))
if (n >= total_size)
strncatUsage(tok);
}