[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 15 11:17:50 UTC 2018
sw/source/filter/ww8/ww8graf.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit f93583f8694dbb626e511cf24ae366dce725e564
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 15 10:27:22 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 15 13:17:24 2018 +0200
ofz#9908 validate no negative editengine selection positions
Change-Id: I37dace2051518224c55756362facd3edba4a9571
Reviewed-on: https://gerrit.libreoffice.org/59058
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 7de545f1c975..55d57a77174f 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -582,7 +582,9 @@ namespace
bool IsValidSel(const EditEngine& rEngine, const ESelection& rSel)
{
const auto nParaCount = rEngine.GetParagraphCount();
- return rSel.nStartPara < nParaCount && rSel.nEndPara < nParaCount;
+ if (rSel.nStartPara < nParaCount && rSel.nEndPara < nParaCount)
+ return rSel.nStartPos >= 0 && rSel.nEndPos >= 0;
+ return false;
}
}
More information about the Libreoffice-commits
mailing list