sw/source/filter/ww8/ww8graf.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit ca3038a05188084b012dd3c799494f30bc5c47ef Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Aug 15 10:27:22 2018 +0100 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Thu Aug 16 11:54:53 2018 +0200 ofz#9908 validate no negative editengine selection positions Change-Id: I37dace2051518224c55756362facd3edba4a9571 Reviewed-on: https://gerrit.libreoffice.org/59059 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 53a3c3289f71..36a4aea53df8 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -581,7 +581,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; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits