summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-08 20:58:24 +0000
committerMichael Stahl <mstahl@redhat.com>2015-01-13 13:02:40 +0000
commit1d372a219a412f2710a1c7e7b794ea58dd1dcba9 (patch)
tree7f6ca30c17e36f9256fc76073c48e9f97b95c5b0
parentonly delete cell content for CELLTYPE_NONE, fdo#88200 (diff)
downloadcore-1d372a219a412f2710a1c7e7b794ea58dd1dcba9.tar.gz
core-1d372a219a412f2710a1c7e7b794ea58dd1dcba9.zip
asan: global-buffer-overflow on fdo55736-1.docx
throws on master, be more conservative here (cherry picked from commit 6b084f0001fc15112bf3c40d20a0c7096c83b7fe) Change-Id: If69a57aa9ff011cc670f868cb87b3a1c4d904435 Reviewed-on: https://gerrit.libreoffice.org/13818 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--basegfx/source/tools/unotools.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/basegfx/source/tools/unotools.cxx b/basegfx/source/tools/unotools.cxx
index d4ff311ea017..f6b1ba89ca94 100644
--- a/basegfx/source/tools/unotools.cxx
+++ b/basegfx/source/tools/unotools.cxx
@@ -53,7 +53,10 @@ namespace unotools
{
const sal_Int32 nInnerSequenceCount(pInnerSequence->getLength());
- if(pInnerSequenceFlags->getLength() != nInnerSequenceCount)
+ if (!nInnerSequenceCount)
+ break;
+
+ if (pInnerSequenceFlags->getLength() != nInnerSequenceCount)
throw lang::IllegalArgumentException();
// prepare new polygon