diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-21 13:26:44 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2015-08-21 15:13:19 +0000 |
commit | 25330c39e5f80b3039f753d35b3e3546279fd5f2 (patch) | |
tree | 7f2cd7d417b17b55752334213a4620e2bfba0305 /sw | |
parent | 937e85beb5d0aeadf27c55f5ed3d50d7140538ff (diff) |
don't crash due to earlier short reads
Change-Id: I682a9bf72cbe18999c0c5acc495e813727e0e372
(cherry picked from commit 0030efe09ad9447933ac3b1875c270ed1649aee7)
Reviewed-on: https://gerrit.libreoffice.org/17909
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/data/ww6/pass/crash-4.doc | bin | 0 -> 6611 bytes | |||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 3 |
2 files changed, 3 insertions, 0 deletions
diff --git a/sw/qa/core/data/ww6/pass/crash-4.doc b/sw/qa/core/data/ww6/pass/crash-4.doc Binary files differnew file mode 100644 index 000000000000..5abaecc2b3c0 --- /dev/null +++ b/sw/qa/core/data/ww6/pass/crash-4.doc diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 83b6490a066b..03bada1196b3 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -4382,6 +4382,9 @@ void WW8RStyle::ImportOldFormatStyles() if (eSti == ww::stiNil) continue; + if (stcp >= aPAPXOffsets.size()) + continue; + rSI.bValid = true; if (ww::StandardStiIsCharStyle(eSti) && !aPAPXOffsets[stcp].mnSize) |