diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-15 10:27:22 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2018-08-16 11:54:53 +0200 |
commit | ca3038a05188084b012dd3c799494f30bc5c47ef (patch) | |
tree | efaa9e50f6c61bd9e36f94b6b8f26ce8c8d5a124 /sw/source | |
parent | 99762024dc5a2d5514c517c96c588949e30328b7 (diff) |
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+LibreOffice@googlemail.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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; } } |