diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-06 20:26:40 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-06 22:08:16 +0100 |
commit | 040b1fc33384f153a6cd209b58cdf1b2f71cfbd6 (patch) | |
tree | 106df3203a59e0019b37703a122495d347acf2f3 /emfio | |
parent | 1ca9388900b8cf4aa1ae67533432acf37a94281e (diff) |
ofz#4980 bail early with 0 points
even if start is 1 of 0
Change-Id: I7e6ad8bcd20f160e08d8795aa38e52fe3aa3cbee
Reviewed-on: https://gerrit.libreoffice.org/47515
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r-- | emfio/source/reader/emfreader.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx index e4f89420b930..52e86618bd0c 100644 --- a/emfio/source/reader/emfreader.cxx +++ b/emfio/source/reader/emfreader.cxx @@ -494,7 +494,7 @@ namespace emfio { bool bRecordOk = nPoints <= SAL_MAX_UINT16; SAL_WARN_IF(!bRecordOk, "emfio", "polygon record has more polygons than we can handle"); - if (!bRecordOk) + if (!bRecordOk || !nPoints) return tools::Polygon(); auto nRemainingSize = std::min(nNextPos - mpInputStream->Tell(), mpInputStream->remainingSize()); |