diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-08 20:58:24 +0000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-01-13 13:02:27 +0000 |
commit | 59cc966c33b4a7929f4c9d738a66187b87a3695e (patch) | |
tree | a8d6ba65e896495560b79e759ab0595804945bcc /basegfx | |
parent | 30afccefb7d9ce88cdaea7690825c09c21db7983 (diff) |
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/13817
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/tools/unotools.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/basegfx/source/tools/unotools.cxx b/basegfx/source/tools/unotools.cxx index f5b1e273b8f4..c3e10b4c05e0 100644 --- a/basegfx/source/tools/unotools.cxx +++ b/basegfx/source/tools/unotools.cxx @@ -52,7 +52,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 |