summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-14 08:40:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-14 14:44:55 +0200
commit87b26787804cf1839d1eefd54854e647f716d934 (patch)
tree6efe17bef0cbf4854aa7eeae84577f1af7dbf174 /lotuswordpro
parentd206ddf6c5e253f8fc94c27fff43c42a9f3b2232 (diff)
abandon import on bad entry
Change-Id: I86a48eec43505966bca03aca947ab4d67de41e60 Reviewed-on: https://gerrit.libreoffice.org/58967 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpobjstrm.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx
index b1b9744da682..4ac9fd11d6a5 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.cxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.cxx
@@ -57,7 +57,6 @@
#include <lwpobjstrm.hxx>
#include <lwptools.hxx>
-#include <sal/log.hxx>
#include <sal/types.h>
#include <tools/solar.h>
#include <memory>
@@ -372,11 +371,9 @@ OUString LwpObjectStream::QuickReadStringPtr()
QuickReaduInt16(); //len
OUString str;
- if (diskSize >= sizeof diskSize) {
- LwpTools::QuickReadUnicode(this, str, diskSize-sizeof(diskSize), RTL_TEXTENCODING_MS_1252);
- } else {
- SAL_WARN("lwp", "Too small size " << diskSize);
- }
+ if (diskSize < sizeof diskSize)
+ throw std::range_error("Too small size");
+ LwpTools::QuickReadUnicode(this, str, diskSize-sizeof(diskSize), RTL_TEXTENCODING_MS_1252);
return str;
}