diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-13 09:20:19 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-08-05 14:28:50 +0200 |
commit | 92293ac26393958c8d9069970836775c4c249a98 (patch) | |
tree | b421430ba5769129b009dbfb4a380b89712bf64f | |
parent | ofz#9870: check sequence length before use (diff) | |
download | core-92293ac26393958c8d9069970836775c4c249a98.tar.gz core-92293ac26393958c8d9069970836775c4c249a98.zip |
crashtesting: empty B2DRange range turned into oversized Rectangle
with document ooo47086-1.xls
Change-Id: Ia43b6b3e3951875280892138c7068348f1b56a7c
Reviewed-on: https://gerrit.libreoffice.org/58921
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
(cherry picked from commit eabb2bf06aba0de81a6d1e7715859fa63379325b)
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index c148e5bf1989..17713e3a1f24 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1690,6 +1690,9 @@ static Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPolyPolygon { basegfx::B2DRange aRange(basegfx::tools::getRange(rPolyPolygon)); + if (aRange.isEmpty()) + return Rectangle(); + return Rectangle( FRound(aRange.getMinX()), FRound(aRange.getMinY()), FRound(aRange.getMaxX()), FRound(aRange.getMaxY())); |