From 421c7d874d62f3d0f696df540744845753902583 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 24 Jul 2019 10:25:09 +0100 Subject: cid#1448523 silence bogus Out-of-bounds read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0911133287ace66454e741f7ea994f191d06931c Reviewed-on: https://gerrit.libreoffice.org/76232 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- soltools/cpp/_cpp.c | 1 + soltools/cpp/_lex.c | 1 + soltools/cpp/_macro.c | 7 +++++++ soltools/cpp/_unix.c | 1 + 4 files changed, 10 insertions(+) (limited to 'soltools/cpp') diff --git a/soltools/cpp/_cpp.c b/soltools/cpp/_cpp.c index 0a7ce78d1749..003611c3f53b 100644 --- a/soltools/cpp/_cpp.c +++ b/soltools/cpp/_cpp.c @@ -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; } diff --git a/soltools/cpp/_lex.c b/soltools/cpp/_lex.c index 0efd303d242e..dfd8605a3950 100644 --- a/soltools/cpp/_lex.c +++ b/soltools/cpp/_lex.c @@ -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; diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c index 8a89e9379d36..eaafb86034ef 100644 --- a/soltools/cpp/_macro.c +++ b/soltools/cpp/_macro.c @@ -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) diff --git a/soltools/cpp/_unix.c b/soltools/cpp/_unix.c index 2ee9215524a2..ac4b7624a00a 100644 --- a/soltools/cpp/_unix.c +++ b/soltools/cpp/_unix.c @@ -87,6 +87,7 @@ void case 'A': setsource("", -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); -- cgit ra/co-24.04.5'>distro/collabora/co-24.04.5 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/jurt
AgeCommit message (Collapse)Author
2017-05-18Fix typosAndrea Gelmini
Only replaced "iff" with "if" Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581 Reviewed-on: https://gerrit.libreoffice.org/37782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-16Also filter out flags like -fsanitize-address-globals-dead-strippingStephan Bergmann
...to avoid -Werror,-Wunused-command-line-argument in case some ASan build setting passes in such flags Change-Id: Ia613a10e3564a23715019ee0c7c755cdcbf7a47c
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-03-25Fix typosAndrea Gelmini
Change-Id: Id5811d092917c872715559f4508d01e4173d090c Reviewed-on: https://gerrit.libreoffice.org/35636 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-16Fix typosAndrea Gelmini
Change-Id: I1488e2147fa0cd4a821eb5bfe172a58a4e396ace Reviewed-on: https://gerrit.libreoffice.org/35224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-01-26-Werror=implicit-fallthrough= (GCC 7)Stephan Bergmann
Change-Id: I703a5f19536b08a87f2282a278218d0fcecfb515