cid#1448523 silence bogus Out-of-bounds read
Change-Id: I0911133287ace66454e741f7ea994f191d06931c Reviewed-on: https://gerrit.libreoffice.org/76232 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -74,6 +74,7 @@ void
|
||||
{
|
||||
trp->tp = trp->lp = trp->bp;
|
||||
outptr = outbuf;
|
||||
// coverity[overrun-buffer-arg: FALSE] - a multiple of trp->max is allocated, not trp->max itself
|
||||
anymacros |= gettokens(trp, 1);
|
||||
trp->tp = trp->bp;
|
||||
}
|
||||
|
||||
@@ -364,6 +364,7 @@ continue2:
|
||||
{
|
||||
trp->lp = tp;
|
||||
tp = growtokenrow(trp);
|
||||
// coverity[overrun-local : FALSE] - a multiple of trp->max is allocated, not trp->max itself
|
||||
maxp = &trp->bp[trp->max];
|
||||
}
|
||||
tp->type = UNCLASS;
|
||||
|
||||
@@ -287,7 +287,10 @@ void
|
||||
if (np->flag & ISMAC)
|
||||
builtin(trp, np->val);
|
||||
else
|
||||
{
|
||||
// coverity[overrun-buffer-arg: FALSE] - a multiple of trp->max is allocated, not trp->max itself
|
||||
expand(trp, np, &validators);
|
||||
}
|
||||
tp = trp->tp;
|
||||
} // end for
|
||||
if (flag)
|
||||
@@ -430,7 +433,10 @@ int
|
||||
while (parens > 0)
|
||||
{
|
||||
if (trp->tp >= trp->lp)
|
||||
{
|
||||
// coverity[overrun-buffer-arg: FALSE] - a multiple of trp->max is allocated, not trp->max itself
|
||||
gettokens(trp, 0);
|
||||
}
|
||||
if (needspace)
|
||||
{
|
||||
needspace = 0;
|
||||
@@ -602,6 +608,7 @@ void
|
||||
tt[len] = '\0';
|
||||
setsource("<##>", -1, -1, tt, 0);
|
||||
maketokenrow(3, &ntr);
|
||||
// coverity[overrun-buffer-arg: FALSE] - a multiple of trp->max is allocated, not trp->max itself
|
||||
gettokens(&ntr, 1);
|
||||
unsetsource();
|
||||
if (ntr.bp->type == UNCLASS)
|
||||
|
||||
@@ -87,6 +87,7 @@ void
|
||||
case 'A':
|
||||
setsource("<cmdarg>", -1, -1, optarg, 0);
|
||||
maketokenrow(3, &tr);
|
||||
// coverity[overrun-buffer-arg: FALSE] - a multiple of trp->max is allocated, not trp->max itself
|
||||
gettokens(&tr, 1);
|
||||
doadefine(&tr, c);
|
||||
dofree(tr.bp);
|
||||
|
||||
Reference in New Issue
Block a user