[Libreoffice-commits] core.git: editeng/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Aug 2 20:16:49 UTC 2018
editeng/source/editeng/impedit2.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 1cb3195fa7859618736002dedc3bd0ff7e164c35
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 2 15:58:52 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Aug 2 22:16:21 2018 +0200
coverity#1438198 silence using invalid iterator
Change-Id: Ibccf6d3838335ae2d8a3a7f8187df8f2e173f043
Reviewed-on: https://gerrit.libreoffice.org/58482
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 38d99f120830..c075a8ae6f59 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1737,8 +1737,11 @@ void ImpEditEngine::InitScriptTypes( sal_Int32 nPara )
++nIdx;
// Remove any entries *inside* the current run:
- while ( nIdx < rTypes.size() && rTypes[nIdx].nEndPos <= nEnd )
- rTypes.erase( rTypes.begin()+nIdx );
+ while (nIdx < rTypes.size() && rTypes[nIdx].nEndPos <= nEnd)
+ {
+ // coverity[use_iterator] - we're protected from a bad iterator by the above condition
+ rTypes.erase(rTypes.begin() + nIdx);
+ }
// special case:
if(nIdx < rTypes.size() && rTypes[nIdx].nStartPos < nStart && rTypes[nIdx].nEndPos > nEnd)
More information about the Libreoffice-commits
mailing list