File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -556,17 +556,17 @@ ValueFlow::Value CheckBufferOverrunImpl::getBufferSize(const Token *bufTok) cons
556556{
557557 if (!bufTok->valueType ())
558558 return ValueFlow::Value (-1 );
559- const Token* varTok = bufTok;
559+
560560 if (bufTok->isUnaryOp (" &" )) {
561561 bufTok = bufTok->astOperand1 ();
562562 if (Token::simpleMatch (bufTok, " [" )) {
563563 const Token* index = bufTok->astOperand2 ();
564564 if (!(index && index->hasKnownIntValue () && index->getKnownIntValue () == 0 ))
565565 return ValueFlow::Value (-1 );
566- varTok = bufTok->astOperand1 ();
566+ bufTok = bufTok->astOperand1 ();
567567 }
568568 }
569- const Variable *var = varTok ->variable ();
569+ const Variable *var = bufTok ->variable ();
570570
571571 if (!var || var->dimensions ().empty ()) {
572572 const ValueFlow::Value *value = getBufferSizeValue (bufTok);
You can’t perform that action at this time.
0 commit comments