summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-21 13:26:44 +0100
committerDavid Tardon <dtardon@redhat.com>2015-08-21 15:17:48 +0000
commit319d725c73b8bf60158961aa0b014258708effab (patch)
treece22f9afaacdc8181dffec1d81e6d57b7f805044 /sw/source/filter
parent72dbb1bb9c83f85050a892bc0886f0f2a56a3f51 (diff)
don't crash due to earlier short reads
Change-Id: I682a9bf72cbe18999c0c5acc495e813727e0e372 (cherry picked from commit 0030efe09ad9447933ac3b1875c270ed1649aee7) Reviewed-on: https://gerrit.libreoffice.org/17903 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 16273ed56f49..f214746c1bde 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -4380,6 +4380,9 @@ void WW8RStyle::ImportOldFormatStyles()
if (eSti == ww::stiNil)
continue;
+ if (stcp >= aPAPXOffsets.size())
+ continue;
+
rSI.bValid = true;
if (ww::StandardStiIsCharStyle(eSti) && !aPAPXOffsets[stcp].mnSize)